First sections of a record system
Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Ursprung
a9907b9ad1
Commit
c13b024f93
@ -71,6 +71,7 @@ public class FightSystem extends JavaPlugin {
|
||||
new InFightInventoryListener();
|
||||
new FreezeWorldStateListener();
|
||||
new EventJoinListener();
|
||||
new EventRecordListener();
|
||||
new CheckListener();
|
||||
new TestListener();
|
||||
new NormalJoinListener();
|
||||
|
@ -0,0 +1,27 @@
|
||||
package de.steamwar.fightsystem.listener;
|
||||
|
||||
import de.steamwar.fightsystem.Config;
|
||||
import de.steamwar.fightsystem.fight.Fight;
|
||||
import de.steamwar.fightsystem.fight.FightPlayer;
|
||||
import de.steamwar.fightsystem.states.FightState;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.player.PlayerJoinEvent;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
public class EventRecordListener extends BasicListener {
|
||||
|
||||
public EventRecordListener() {
|
||||
super(Config.event() ? EnumSet.allOf(FightState.class) : EnumSet.noneOf(FightState.class));
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||
public void onPlayerJoin(PlayerJoinEvent e){
|
||||
FightPlayer fp = Fight.getFightPlayer(e.getPlayer());
|
||||
if(fp == null || !fp.isLiving())
|
||||
return;
|
||||
|
||||
//TODO: Send Change
|
||||
}
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
package de.steamwar.fightsystem.record;
|
||||
|
||||
public class RecordSystem {
|
||||
}
|
In neuem Issue referenzieren
Einen Benutzer sperren