Dieser Commit ist enthalten in:
Ursprung
afc3440486
Commit
407eb7a468
@ -22,6 +22,8 @@ package de.steamwar.schematicsystem;
|
||||
import de.steamwar.message.Message;
|
||||
import de.steamwar.schematicsystem.commands.DownloadCommand;
|
||||
import de.steamwar.schematicsystem.commands.SchematicCommand;
|
||||
import de.steamwar.schematicsystem.listener.PlayerEventListener;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
public class SchematicSystem extends JavaPlugin {
|
||||
@ -35,6 +37,8 @@ public class SchematicSystem extends JavaPlugin {
|
||||
|
||||
new SchematicCommand();
|
||||
new DownloadCommand();
|
||||
|
||||
Bukkit.getPluginManager().registerEvents(new PlayerEventListener(), this);
|
||||
}
|
||||
|
||||
public static SchematicSystem getInstance() {
|
||||
|
@ -472,6 +472,11 @@ public class SchematicCommandUtils {
|
||||
inv.open();
|
||||
}
|
||||
|
||||
public static void quitPlayer(Player player) {
|
||||
CACHED_LISTS.remove(player);
|
||||
PUBLIC_TOGGLED.remove(player);
|
||||
}
|
||||
|
||||
@AllArgsConstructor
|
||||
@With
|
||||
static class CachedSchematicList {
|
||||
|
@ -0,0 +1,14 @@
|
||||
package de.steamwar.schematicsystem.listener;
|
||||
|
||||
import de.steamwar.schematicsystem.commands.SchematicCommandUtils;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
|
||||
public class PlayerEventListener implements Listener {
|
||||
|
||||
@EventHandler
|
||||
public void onPlayerQuit(PlayerQuitEvent event) {
|
||||
SchematicCommandUtils.quitPlayer(event.getPlayer());
|
||||
}
|
||||
}
|
In neuem Issue referenzieren
Einen Benutzer sperren