Add Configs and add move outside
Dieser Commit ist enthalten in:
Ursprung
f47dcf30e0
Commit
89345a0e8d
34
configs/sears.yml
Normale Datei
34
configs/sears.yml
Normale Datei
@ -0,0 +1,34 @@
|
|||||||
|
tower:
|
||||||
|
regions:
|
||||||
|
1:
|
||||||
|
minX: 335
|
||||||
|
maxX: 384
|
||||||
|
minZ: 530
|
||||||
|
maxZ: 579
|
||||||
|
escapeHeight: 12
|
||||||
|
spawn:
|
||||||
|
x: 356
|
||||||
|
y: 233
|
||||||
|
z: 557
|
||||||
|
yaw: 0.0
|
||||||
|
pitch: 0.0
|
||||||
|
doors:
|
||||||
|
1:
|
||||||
|
x: 353
|
||||||
|
y: 230
|
||||||
|
z: 559
|
||||||
|
2:
|
||||||
|
x: 354
|
||||||
|
y: 230
|
||||||
|
z: 559
|
||||||
|
lavaY: 280
|
||||||
|
laveSpace: 7
|
||||||
|
|
||||||
|
minX: 325
|
||||||
|
maxX: 374
|
||||||
|
minZ: 540
|
||||||
|
maxZ: 589
|
||||||
|
|
||||||
|
winconditions:
|
||||||
|
- LAST_REMAINING
|
||||||
|
- LAST_OUTSIDE
|
@ -19,12 +19,15 @@
|
|||||||
|
|
||||||
package de.steamwar.towerrun.listener;
|
package de.steamwar.towerrun.listener;
|
||||||
|
|
||||||
|
import de.steamwar.towerrun.config.WorldConfig;
|
||||||
import de.steamwar.towerrun.game.TowerRunGame;
|
import de.steamwar.towerrun.game.TowerRunGame;
|
||||||
import de.steamwar.towerrun.game.TowerRunPlayer;
|
import de.steamwar.towerrun.game.TowerRunPlayer;
|
||||||
import de.steamwar.towerrun.state.GameStateBukkitListener;
|
import de.steamwar.towerrun.state.GameStateBukkitListener;
|
||||||
import de.steamwar.towerrun.state.GameStates;
|
import de.steamwar.towerrun.state.GameStates;
|
||||||
|
import org.bukkit.Location;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.player.PlayerJoinEvent;
|
import org.bukkit.event.player.PlayerJoinEvent;
|
||||||
|
import org.bukkit.event.player.PlayerMoveEvent;
|
||||||
import org.bukkit.event.player.PlayerQuitEvent;
|
import org.bukkit.event.player.PlayerQuitEvent;
|
||||||
|
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
@ -46,4 +49,14 @@ public class GlobalListener extends GameStateBukkitListener {
|
|||||||
}
|
}
|
||||||
TowerRunPlayer.remove(event.getPlayer());
|
TowerRunPlayer.remove(event.getPlayer());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void onPlayerMove(PlayerMoveEvent event) {
|
||||||
|
Location to = event.getTo();
|
||||||
|
if (to.getX() > WorldConfig.MAP_MIN_X && to.getX() < WorldConfig.MAP_MAX_X && to.getZ() > WorldConfig.MAP_MIN_Z && to.getZ() < WorldConfig.MAP_MAX_Z) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
event.setCancelled(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren