Dieser Commit ist enthalten in:
Ursprung
a15aa5c373
Commit
88fbfa0f44
@ -57,6 +57,7 @@ public class LobbySystem extends JavaPlugin {
|
||||
new InventoryInteraction();
|
||||
new WorldInteraction();
|
||||
new PlayerSeatListener();
|
||||
new MapsRotateListener();
|
||||
|
||||
new AlphaWall(l -> l.getX() > 1199, AlphaWall.REFLECT_X);
|
||||
new AlphaWall(l -> l.getX() < 2977, AlphaWall.REFLECT_X);
|
||||
|
38
src/de/steamwar/lobby/listener/MapsRotateListener.java
Normale Datei
38
src/de/steamwar/lobby/listener/MapsRotateListener.java
Normale Datei
@ -0,0 +1,38 @@
|
||||
/*
|
||||
* This file is a part of the SteamWar software.
|
||||
*
|
||||
* Copyright (C) 2022 SteamWar.de-Serverteam
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package de.steamwar.lobby.listener;
|
||||
|
||||
import de.steamwar.lobby.command.ModifyCommand;
|
||||
import org.bukkit.entity.ItemFrame;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.player.PlayerInteractEntityEvent;
|
||||
|
||||
public class MapsRotateListener extends BasicListener {
|
||||
|
||||
@EventHandler
|
||||
public void onPlayerInteractEntity(PlayerInteractEntityEvent event) {
|
||||
if (ModifyCommand.modifying(event.getPlayer())) {
|
||||
return;
|
||||
}
|
||||
if (event.getRightClicked() instanceof ItemFrame) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
}
|
In neuem Issue referenzieren
Einen Benutzer sperren