forked from SteamWar/SteamWar
Format code
This commit is contained in:
@@ -53,17 +53,17 @@ public class ModifyCommand extends SWCommand implements Listener {
|
||||
@Register
|
||||
public void modify(Player player) {
|
||||
SteamwarUser user = SteamwarUser.get(player.getUniqueId());
|
||||
if(!user.hasPerm(UserPerm.ADMINISTRATION)) {
|
||||
if (!user.hasPerm(UserPerm.ADMINISTRATION)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(modifying(player)) {
|
||||
if (modifying(player)) {
|
||||
modifying.remove(player);
|
||||
LobbySystem.getEntityServer(true).removePlayer(player);
|
||||
player.setGameMode(GameMode.ADVENTURE);
|
||||
player.setOp(false);
|
||||
PlayerSpawn.giveItems(player);
|
||||
}else {
|
||||
} else {
|
||||
modifying.add(player);
|
||||
LobbySystem.getEntityServer(true).addPlayer(player);
|
||||
player.setGameMode(GameMode.CREATIVE);
|
||||
@@ -82,9 +82,9 @@ public class ModifyCommand extends SWCommand implements Listener {
|
||||
@Register("waitinghallspawn")
|
||||
public void setWaitingHallSpawn(Player player) {
|
||||
SteamwarUser user = SteamwarUser.get(player.getUniqueId());
|
||||
if(!user.hasPerm(UserPerm.ADMINISTRATION))
|
||||
if (!user.hasPerm(UserPerm.ADMINISTRATION))
|
||||
return;
|
||||
|
||||
|
||||
LobbySystem.config().setWaitingHallSpawn(player.getLocation());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ public class PortalCommand extends SWCommand {
|
||||
private Location locationOfPlayer(Player player) {
|
||||
Location l = player.getLocation();
|
||||
|
||||
l.setYaw(((CraftPlayer)player).getHandle().getYHeadRot());
|
||||
l.setYaw(((CraftPlayer) player).getHandle().getYHeadRot());
|
||||
return l;
|
||||
}
|
||||
|
||||
@@ -136,14 +136,14 @@ public class PortalCommand extends SWCommand {
|
||||
public void portalRemoveBlue(Player player, Portal portal, int i) {
|
||||
if (noPermissions(player)) return;
|
||||
FightserverPortal handler = (FightserverPortal) portal.getHandler();
|
||||
handler.removeBlue(i-1);
|
||||
handler.removeBlue(i - 1);
|
||||
}
|
||||
|
||||
@Register({"removered"})
|
||||
public void portalRemoveRed(Player player, Portal portal, int i) {
|
||||
if (noPermissions(player)) return;
|
||||
FightserverPortal handler = (FightserverPortal) portal.getHandler();
|
||||
handler.removeRed(i-1);
|
||||
handler.removeRed(i - 1);
|
||||
}
|
||||
|
||||
@Register("remove")
|
||||
@@ -180,7 +180,7 @@ public class PortalCommand extends SWCommand {
|
||||
.getRegionSelector(BukkitAdapter.adapt(player.getWorld()));
|
||||
|
||||
try {
|
||||
CuboidRegion region = (CuboidRegion)regionSelector.getRegion();
|
||||
CuboidRegion region = (CuboidRegion) regionSelector.getRegion();
|
||||
return new PortalLocations(adapt(player.getWorld(), region.getPos1()), adapt(player.getWorld(), region.getPos2()));
|
||||
} catch (IncompleteRegionException e) {
|
||||
LobbySystem.getMessage().send("PORTAL_NO_WORLDEDIT_SELECTION", player);
|
||||
|
||||
Reference in New Issue
Block a user