13
0

Merge pull request 'Add MapsRotateListener' (#11) from Maps into master
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Reviewed-on: #11
Reviewed-by: Lixfel <lixfel@steamwar.de>
Dieser Commit ist enthalten in:
Lixfel 2022-03-26 11:57:13 +01:00
Commit 41d8db33ea
2 geänderte Dateien mit 39 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -57,6 +57,7 @@ public class LobbySystem extends JavaPlugin {
new InventoryInteraction(); new InventoryInteraction();
new WorldInteraction(); new WorldInteraction();
new PlayerSeatListener(); new PlayerSeatListener();
new MapsRotateListener();
new AlphaWall(l -> l.getX() > 1199, AlphaWall.REFLECT_X); new AlphaWall(l -> l.getX() > 1199, AlphaWall.REFLECT_X);
new AlphaWall(l -> l.getX() < 2977, 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);
}
}
}