13
0
Dieses Repository wurde am 2024-08-05 archiviert. Du kannst Dateien ansehen und es klonen, aber nicht pushen oder Issues/Pull-Requests öffnen.
SchematicSystem/src/de/warking/schematicsystem/SchematicSystem.java

78 Zeilen
2.3 KiB
Java

2019-03-27 15:32:35 +01:00
package de.warking.schematicsystem;
import com.sk89q.worldedit.bukkit.WorldEditPlugin;
import de.warking.hunjy.MySQL.Schematic;
import de.warking.hunjy.MySQL.SchematicType;
import de.warking.schematicsystem.check.Check;
import de.warking.schematicsystem.commands.SchematicCommand;
import de.warking.schematicsystem.listener.PlayerJoinListener;
import de.warking.schematicsystem.listener.PlayerQuitListener;
import de.warking.schematicsystem.utils.CommandRemover;
import de.warking.schematicsystem.utils.Config;
import org.bukkit.Bukkit;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.java.JavaPlugin;
import java.util.HashMap;
import java.util.UUID;
public class SchematicSystem extends JavaPlugin {
public static String SCHEM_DIR = "/home/netuser/schematics/";
public static String PREFIX = "§8[§3Schematic§8] §7";
private static SchematicSystem instance;
public static HashMap<UUID, Schematic> currCheckSchems = new HashMap<>();
public void onEnable() {
instance = this;
Config.load();
try {
CommandRemover.removeAll("/schematic", "/schem", "//schematic", "//schem");
} catch (Exception ex) {
ex.printStackTrace();
}
getCommand("schematic").setExecutor(new SchematicCommand());
getCommand("/schematic").setExecutor(new SchematicCommand());
getCommand("schem").setExecutor(new SchematicCommand());
getCommand("/schem").setExecutor(new SchematicCommand());
init();
Bukkit.getScheduler().scheduleAsyncRepeatingTask(instance, new Runnable() {
@Override
public void run() {
Check.sendTeamMembersCSchematics(Check.sendTeamMembersCSchematicsInfo());
}
}, 0, 20*60*10);
}
public void onDisable() {
}
public void init() {
PluginManager pm = Bukkit.getPluginManager();
pm.registerEvents(new PlayerJoinListener(), instance);
pm.registerEvents(new PlayerQuitListener(), instance);
}
public static SchematicSystem getInstance() {
return instance;
}
public static WorldEditPlugin getWorldEditPlugin() {
return (WorldEditPlugin) Bukkit.getPluginManager().getPlugin("WorldEdit");
}
public static HashMap<UUID, Schematic> getCurrCheckSchems() {
return currCheckSchems;
}
2019-03-27 15:32:35 +01:00
}