e
This commit is contained in:
parent
2b08e12f67
commit
f210b41f2e
4
src/main/java/rip/tilly/bedwars/customitems/e.java
Normal file
4
src/main/java/rip/tilly/bedwars/customitems/e.java
Normal file
@ -0,0 +1,4 @@
|
||||
package rip.tilly.bedwars.customitems;
|
||||
|
||||
public class e {
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
package rip.tilly.bedwars.customitems.popuptower;
|
||||
|
||||
import org.bukkit.block.Block;
|
||||
|
||||
public class PlaceTower {
|
||||
|
||||
public PlaceTower(Block block, String xyz, )
|
||||
}
|
@ -1,15 +1,19 @@
|
||||
package rip.tilly.bedwars.listeners;
|
||||
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.block.*;
|
||||
import org.bukkit.event.entity.CreatureSpawnEvent;
|
||||
import org.bukkit.event.entity.FoodLevelChangeEvent;
|
||||
import org.bukkit.event.hanging.HangingBreakEvent;
|
||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
||||
import org.bukkit.event.inventory.InventoryType;
|
||||
import org.bukkit.event.player.PlayerToggleFlightEvent;
|
||||
import org.bukkit.event.weather.WeatherChangeEvent;
|
||||
import rip.tilly.bedwars.BedWars;
|
||||
import rip.tilly.bedwars.playerdata.PlayerData;
|
||||
import rip.tilly.bedwars.playerdata.PlayerState;
|
||||
|
||||
public class RandomListeners implements Listener {
|
||||
@ -82,4 +86,18 @@ public class RandomListeners implements Listener {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onInventoryClick(InventoryClickEvent event) {
|
||||
Player player = (Player) event.getWhoClicked();
|
||||
PlayerData playerData = this.plugin.getPlayerDataManager().getPlayerData(player.getUniqueId());
|
||||
if (playerData.getPlayerState() != PlayerState.PLAYING) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.getSlotType() == InventoryType.SlotType.ARMOR) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -158,6 +158,13 @@ public class WorldListener implements Listener {
|
||||
return;
|
||||
}
|
||||
|
||||
Block chest = event.getBlockPlaced();
|
||||
if (chest.getType() == Material.CHEST) {
|
||||
Location location = event.getBlockPlaced().getLocation();
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
game.addPlacedBlock(block);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user