GameFlagsPlugin class
Пакет: com.hypixel.hytale.builtin.gameflags
Файл: com/hypixel/hytale/builtin/gameflags/GameFlagsPlugin.java
extends: JavaPlugin
Поля (2)
| Модификаторы | Тип | Имя |
|---|---|---|
static |
GameFlagsPlugin |
instance |
|
|
instance |
Методы (3)
| Модификаторы | Возврат | Сигнатура |
|---|---|---|
static |
GameFlagsPlugin |
getGameFlagsPlugin get() |
public |
UniverseResourceType<GameFlagsResource> |
getResourceTypeUniverseResourceType<GameFlagsResource> getResourceType() |
abstract |
|
super super(var1) |
Исходный код
Показать/скрыть
class="kw">package com.hypixel.hytale.builtin.gameflags;
class="kw">import com.hypixel.hytale.builtin.gameflags.command.GameFlagsCommand;
class="kw">import com.hypixel.hytale.server.core.modules.interaction.interaction.config.Interaction;
class="kw">import com.hypixel.hytale.server.core.plugin.JavaPlugin;
class="kw">import com.hypixel.hytale.server.core.plugin.JavaPluginInit;
class="kw">import com.hypixel.hytale.server.core.universe.Universe;
class="kw">import com.hypixel.hytale.server.core.universe.resources.UniverseResourceType;
class="kw">import javax.annotation.Nonnull;
class="kw">public class GameFlagsPlugin class="kw">extends JavaPlugin {
class="kw">private class="kw">static GameFlagsPlugin instance;
class="kw">private UniverseResourceType<GameFlagsResource> resourceType;
class="kw">public class="kw">static GameFlagsPlugin get() {
class="kw">return instance;
}
class="kw">public GameFlagsPlugin(@Nonnull JavaPluginInit var1) {
super(var1);
}
@Override
class="kw">protected void setup() {
instance = this;
this.resourceType = Universe.registerResource(GameFlagsResource.class, "GameFlags", GameFlagsResource.CODEC);
this.getCodecRegistry(Interaction.CODEC)
.register("GameFlagCondition", GameFlagConditionInteraction.class, GameFlagConditionInteraction.CODEC)
.register("SetGameFlag", SetGameFlagInteraction.class, SetGameFlagInteraction.CODEC);
this.getCommandRegistry().registerCommand(new GameFlagsCommand());
}
class="kw">public UniverseResourceType<GameFlagsResource> getResourceType() {
class="kw">return this.resourceType;
}
}