Add PortalListener for joining to the Bau World
Dieser Commit ist enthalten in:
Ursprung
689623dabf
Commit
1b3eeb32ba
@ -23,6 +23,7 @@ public class LobbySystem extends JavaPlugin {
|
||||
pm.registerEvents(new ParticleListener(), instance);
|
||||
pm.registerEvents(new PlayerHiderListener(), instance);
|
||||
pm.registerEvents(new EnderPearlListener(), instance);
|
||||
pm.registerEvents(new PortalListener(), instance);
|
||||
}
|
||||
|
||||
|
||||
|
@ -39,7 +39,7 @@ public class EnderPearlListener implements Listener {
|
||||
if(player == null) //in case of player leave
|
||||
return;
|
||||
LobbyInventory.givePlayerLobbyItems(player);
|
||||
}, 20 * 3);
|
||||
}, 20 * 4);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
15
src/de/steamwar/lobby/listener/PortalListener.java
Normale Datei
15
src/de/steamwar/lobby/listener/PortalListener.java
Normale Datei
@ -0,0 +1,15 @@
|
||||
package de.steamwar.lobby.listener;
|
||||
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.player.PlayerPortalEvent;
|
||||
|
||||
public class PortalListener implements Listener {
|
||||
|
||||
@EventHandler
|
||||
public void portalEnter(PlayerPortalEvent event) {
|
||||
event.setCancelled(true);
|
||||
event.getPlayer().performCommand("/bau");
|
||||
}
|
||||
|
||||
}
|
In neuem Issue referenzieren
Einen Benutzer sperren