mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-12-25 17:08:32 +01:00
Add @SuppressWarnings("unused") to listeners.
This commit is contained in:
parent
a4a923c23c
commit
4395ca06b4
@ -32,6 +32,7 @@ import java.util.HashSet;
|
||||
|
||||
import static com.github.intellectualsites.plotsquared.plot.util.ReflectionUtils.getRefClass;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class ChunkListener implements Listener {
|
||||
|
||||
private RefMethod methodGetHandleChunk;
|
||||
|
@ -18,6 +18,7 @@ import org.bukkit.plugin.Plugin;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class EntityPortal_1_7_9 implements Listener {
|
||||
private static boolean ignoreTP = false;
|
||||
|
||||
|
@ -16,6 +16,7 @@ import org.bukkit.event.entity.EntitySpawnEvent;
|
||||
import org.bukkit.metadata.FixedMetadataValue;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class EntitySpawnListener implements Listener {
|
||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||
public void creatureSpawnEvent(EntitySpawnEvent event) {
|
||||
|
@ -16,6 +16,7 @@ import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class ForceFieldListener {
|
||||
|
||||
private static Set<PlotPlayer> getNearbyPlayers(Player player, Plot plot) {
|
||||
|
@ -56,6 +56,7 @@ import java.util.regex.Pattern;
|
||||
/**
|
||||
* Player Events involving plots.
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public class PlayerEvents extends PlotListener implements Listener {
|
||||
|
||||
private boolean pistonBlocks = true;
|
||||
|
@ -14,7 +14,9 @@ import org.bukkit.event.block.BlockExplodeEvent;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class PlayerEvents183 implements Listener {
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||
public void onBigBoom(BlockExplodeEvent event) {
|
||||
Block block = event.getBlock();
|
||||
@ -38,12 +40,7 @@ public class PlayerEvents183 implements Listener {
|
||||
if (plot == null || !plot.getFlag(Flags.EXPLOSION).or(false)) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
Iterator<Block> iterator = event.blockList().iterator();
|
||||
while (iterator.hasNext()) {
|
||||
Block b = iterator.next();
|
||||
if (!plot.equals(area.getOwnedPlot(BukkitUtil.getLocation(b.getLocation())))) {
|
||||
iterator.remove();
|
||||
}
|
||||
}
|
||||
event.blockList().removeIf(
|
||||
b -> !plot.equals(area.getOwnedPlot(BukkitUtil.getLocation(b.getLocation()))));
|
||||
}
|
||||
}
|
||||
|
@ -32,6 +32,7 @@ import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class PlayerEvents_1_8 extends PlotListener implements Listener {
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
|
@ -9,6 +9,7 @@ import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.entity.LingeringPotionSplashEvent;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class PlayerEvents_1_9 implements Listener {
|
||||
|
||||
private final PlayerEvents parent;
|
||||
|
@ -28,6 +28,7 @@ import java.util.Iterator;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.UUID;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class PlotPlusListener extends PlotListener implements Listener {
|
||||
|
||||
private static final HashMap<String, Interval> feedRunnable = new HashMap<>();
|
||||
|
@ -12,7 +12,9 @@ import org.bukkit.event.entity.EntityPickupItemEvent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class PlotPlusListener_1_12 implements Listener {
|
||||
|
||||
@EventHandler public void onItemPickup(EntityPickupItemEvent event) {
|
||||
LivingEntity ent = event.getEntity();
|
||||
if (ent instanceof Player) {
|
||||
|
@ -11,7 +11,9 @@ import org.bukkit.event.player.PlayerPickupItemEvent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class PlotPlusListener_Legacy implements Listener {
|
||||
|
||||
@EventHandler public void onItemPickup(PlayerPickupItemEvent event) {
|
||||
Player player = event.getPlayer();
|
||||
PlotPlayer pp = BukkitUtil.getPlayer(player);
|
||||
|
@ -19,6 +19,7 @@ import java.lang.reflect.Method;
|
||||
|
||||
import static com.github.intellectualsites.plotsquared.plot.util.ReflectionUtils.getRefClass;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class SingleWorldListener implements Listener {
|
||||
|
||||
private Method methodGetHandleChunk;
|
||||
|
@ -12,7 +12,7 @@ import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.world.WorldInitEvent;
|
||||
import org.bukkit.generator.ChunkGenerator;
|
||||
|
||||
public class WorldEvents implements Listener {
|
||||
@SuppressWarnings("unused") public class WorldEvents implements Listener {
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||
public void onWorldInit(WorldInitEvent event) {
|
||||
|
@ -36,6 +36,7 @@ import java.util.*;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class PlayerEvents extends PlotListener implements Listener {
|
||||
|
||||
private boolean pistonBlocks = true;
|
||||
|
@ -14,6 +14,7 @@ import com.github.intellectualsites.plotsquared.plot.object.PlotArea;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class WorldEvents implements Listener {
|
||||
|
||||
public WorldEvents() {
|
||||
|
Loading…
Reference in New Issue
Block a user