leave command + boxcart update + mapreset
This commit is contained in:
@@ -1,14 +1,22 @@
|
||||
package hu.jgj52.wolfFFA;
|
||||
|
||||
import hu.jgj52.wolfFFA.Commands.EditKitCommand;
|
||||
import hu.jgj52.wolfFFA.Commands.LeaveCommand;
|
||||
import hu.jgj52.wolfFFA.Commands.TpToFfaCommand;
|
||||
import hu.jgj52.wolfFFA.Listeners.BlockBreakListener;
|
||||
import hu.jgj52.wolfFFA.Listeners.KitListener;
|
||||
import hu.jgj52.wolfFFA.Listeners.PlayerDamegeListener;
|
||||
import hu.jgj52.wolfFFA.Utils.MapReset;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public final class Main extends JavaPlugin {
|
||||
|
||||
private MapReset mapReset;
|
||||
private final Map<Player, Player> players = new HashMap<>();
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
@@ -18,8 +26,11 @@ public final class Main extends JavaPlugin {
|
||||
|
||||
getCommand("tptoffa").setExecutor(new TpToFfaCommand(this));
|
||||
getCommand("editkit").setExecutor(new EditKitCommand(this));
|
||||
getCommand("leave").setExecutor(new LeaveCommand(this));
|
||||
|
||||
getServer().getPluginManager().registerEvents(new KitListener(this), this);
|
||||
getServer().getPluginManager().registerEvents(new BlockBreakListener(this), this);
|
||||
getServer().getPluginManager().registerEvents(new PlayerDamegeListener(this), this);
|
||||
|
||||
this.mapReset = new MapReset(this);
|
||||
}
|
||||
@@ -27,6 +38,7 @@ public final class Main extends JavaPlugin {
|
||||
@Override
|
||||
public void onDisable() {
|
||||
// Plugin shutdown logic
|
||||
players.clear();
|
||||
}
|
||||
|
||||
public static Main getInstance() {
|
||||
@@ -36,4 +48,8 @@ public final class Main extends JavaPlugin {
|
||||
public MapReset getMapResetManager() {
|
||||
return this.mapReset;
|
||||
}
|
||||
|
||||
public Map<Player, Player> getPlayers() {
|
||||
return this.players;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user