13
0

Add MapsRotateListener #11

Zusammengeführt
Lixfel hat 1 Commits von Maps nach master 2022-03-26 11:57:14 +01:00 zusammengeführt
2 geänderte Dateien mit 39 neuen und 0 gelöschten Zeilen
Nur Änderungen aus Commit 88fbfa0f44 werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -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);

Datei anzeigen

@ -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);
}
}
}