Remove fighter movement height restriction, adding block placement restriction #302
@ -139,8 +139,8 @@ KIT_DELETION_DELETE=
|
||||
NO_ARENA_LEAVING=§cDu darfst die Arena nicht verlassen
|
||||
CHECK_JOIN_DENIED=§cAuf diesem Server wird momentan eine Schematic geprüft!
|
||||
CHECK_COMMAND_LOCKED=§cDieser Befehl ist beim Prüfen gesperrt! Admin wird benachrichtigt.
|
||||
NO_BLOCK_BREAK=§cDu darfst derzeit keine Blöcke abbauen
|
||||
NO_BLOCK_PLACE=§cDu darfst derzeit keine Blöcke setzen
|
||||
NO_BLOCK_BREAK=§cDu darfst hier derzeit keine Blöcke abbauen
|
||||
NO_BLOCK_PLACE=§cDu darfst hier derzeit keine Blöcke setzen
|
||||
NO_BOW_USAGE=§cDu darfst den Bogen erst nach Kampfbeginn nutzen
|
||||
NO_PARTICIPANT=§cDu bist kein Kampfteilnehmer
|
||||
NO_FRIENDLY_FIRE=§cDu darfst deinen Teamkollegen keinen Schaden zufügen
|
||||
|
@ -63,8 +63,6 @@ public class ArenaBorder implements Listener {
|
||||
player.damage(2);
|
||||
else if(!Config.GroundWalkable)
|
||||
player.teleport(team.getSpawn());
|
||||
}else if(to.getY() + 1.8 > Config.ArenaRegion.getMaxY()){
|
||||
reset(event);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -30,9 +30,11 @@ import de.steamwar.fightsystem.utils.Region;
|
||||
import net.md_5.bungee.api.ChatMessageType;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.block.BlockPlaceEvent;
|
||||
import org.bukkit.event.player.PlayerMoveEvent;
|
||||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
|
||||
@ -64,13 +66,24 @@ public class TeamArea implements Listener {
|
||||
realSpectator.remove(e.getPlayer());
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void blockPlace(BlockPlaceEvent event) {
|
||||
Player player = event.getPlayer();
|
||||
Block block = event.getBlock();
|
||||
if(Config.BlueExtendRegion.inRegion(block) || Config.RedExtendRegion.inRegion(block))
|
||||
return;
|
||||
|
||||
event.setCancelled(true);
|
||||
FightSystem.getMessage().sendPrefixless("NO_BLOCK_PLACE", player, ChatMessageType.ACTION_BAR);
|
||||
}
|
||||
|
||||
private void checkInTeamRegion(PlayerMoveEvent event, FightTeam team, Player player, FightTeam playerTeam) {
|
||||
boolean spectator = player.getGameMode() == GameMode.SPECTATOR;
|
||||
if(!spectator && playerTeam != null && playerTeam.canPlayerEntern(player))
|
||||
return; // Player can entern
|
||||
|
||||
Region region = team.getExtendRegion();
|
||||
boolean inRegion = region.playerInRegion(event.getTo());
|
||||
boolean inRegion = region.in2dRegion(event.getTo());
|
||||
if(team == playerTeam) {
|
||||
if(spectator) {
|
||||
realSpectator(inRegion, player);
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren