Kick non players and record more blocks (to prevent ghost blocks)
Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Ursprung
5b12e10b98
Commit
ea63704c38
@ -82,10 +82,15 @@ public class EventJoinListener extends BasicListener {
|
|||||||
FightPlayer fp = team.addMember(player);
|
FightPlayer fp = team.addMember(player);
|
||||||
if(!team.hasTeamLeader())
|
if(!team.hasTeamLeader())
|
||||||
team.setLeader(fp);
|
team.setLeader(fp);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(user.getId() == FightSystem.getEventFight().getKampfleiter())
|
if(user.getId() == FightSystem.getEventFight().getKampfleiter()){
|
||||||
FightSystem.setEventLeiter(player);
|
FightSystem.setEventLeiter(player);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(Config.SpectateSystem)
|
||||||
|
player.kickPlayer("§cDu bist kein Kampfteilnehmer");
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
|
@ -104,9 +104,8 @@ public class EventRecordListener extends BasicListener {
|
|||||||
|
|
||||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||||
public void onBlockPhysics(BlockPhysicsEvent e){
|
public void onBlockPhysics(BlockPhysicsEvent e){
|
||||||
if(e.getBlock() != e.getSourceBlock())
|
if(e.getBlock() == e.getSourceBlock() || e.getChangedType() == Material.AIR)
|
||||||
return;
|
RecordSystem.blockChange(e.getBlock());
|
||||||
RecordSystem.blockChange(e.getBlock());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren