> For the complete documentation index, see [llms.txt](https://scheduler.groupez.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://scheduler.groupez.dev/implementation.md).

# Implementation

## Supported Plugins

To have your plugin appear here, contact me on the discord: <https://discord.groupez.dev/>

<table><thead><tr><th width="159">Plugin</th><th width="85">Price</th><th>Link</th></tr></thead><tbody><tr><td>zKoth</td><td>10€</td><td><a href="https://www.spigotmc.org/resources/zkoth-king-of-the-hill.76749/">https://www.spigotmc.org/resources/76749/</a></td></tr><tr><td>zTotem</td><td>10€</td><td><a href="https://www.spigotmc.org/resources/ztotem.47318/">https://www.spigotmc.org/resources/47318/</a></td></tr><tr><td>zAuctionHouse</td><td>12.99€</td><td><a href="https://www.spigotmc.org/resources/1-8-1-20-zauctionhouse-2000-servers-online.63010/">https://www.spigotmc.org/resources/63010/</a></td></tr></tbody></table>

### zKoth

```yaml
implementation: 
  name: ZKOTH 
  koth_name: "koth_name" 
  start_now: false
```

### zTotem

```yaml
implementation: 
  name: ZTOTEM
  totem_name: "totem_name" 
  start_now: false
```

### zAuctionHouse

```yaml
implementation: 
  name: ZAUCTIOHOUSE
```

This implementation allows you to manage the backup of the items.json file

## Create an implementation

Source code: <https://github.com/Maxlego08/zSchedulers>

### First step

The first step is to get the SchedulerManager

```java
@Override
public void onEnable() {
    SchedulerManager manager = getProvider(SchedulerManager.class);
}

private <T> T getProvider(Class<T> classz) {
    RegisteredServiceProvider<T> provider = getServer().getServicesManager().getRegistration(classz);
    return provider == null ? null : provider.getProvider() != null ? (T) provider.getProvider() : null;
}
```

### Implementation

Create a class which will implement Implementation interface.

```java
public class ZkothImplementation implements Implementation {

  private final ZKothPlugin plugin;

  public ZkothImplementation(ZKothPlugin plugin) {
    super();
    this.plugin = plugin;
  }

  @Override
  public String getName() {
    return "ZKOTH";
  }

  @Override
  public void schedule(Scheduler scheduler) {
    String kothName = (String) scheduler.getImplementationValues().getOrDefault("koth_name", "");
    boolean startNow = (boolean) scheduler.getImplementationValues().getOrDefault("start_now", false);

    Optional<Koth> optional = this.plugin.getKothManager().getKoth(kothName);
    if (optional.isPresent()) {

      Koth koth = optional.get();
      koth.spawn(startNow);

    } else {
      Logger.info("Koth with name " + kothName + " was not found with scheduler " + scheduler.getName(),
		LogType.ERROR);
    }
  }
}
```

Now you need to register your implementation:

```java
SchedulerManager schedulerManager = this.getProvider(SchedulerManager.class);
schedulerManager.registerImplementation(new ZkothImplementation(this));
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://scheduler.groupez.dev/implementation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
