예제 #1
0
 @EventHandler
 public void onEntityDamageEvent(EntityDamageEvent event) {
   if (Lobby.get().isLobbyEnabled()) {
     if (event.getCause() == EntityDamageEvent.DamageCause.VOID) {
       Entity entity = event.getEntity();
       if (entity != null) {
         entity.teleport(Settings.get().getLobbyLocation());
       }
     }
     event.setCancelled(true);
   }
 }
예제 #2
0
 @EventHandler
 public void onPlayerSpawnLocation(PlayerSpawnLocationEvent event) {
   if (Lobby.get().isLobbyEnabled()) {
     event.setSpawnLocation(Settings.get().getLobbyLocation());
   }
 }