diff --git a/src/com/bekvon/bukkit/residence/event/ResidenceEnterEvent.java b/src/com/bekvon/bukkit/residence/event/ResidenceEnterEvent.java deleted file mode 100644 index eaf1765..0000000 --- a/src/com/bekvon/bukkit/residence/event/ResidenceEnterEvent.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * To change this template, choose Tools | Templates - * and open the template in the editor. - */ - -package com.bekvon.bukkit.residence.event; - -import com.bekvon.bukkit.residence.protection.ClaimedResidence; -import org.bukkit.entity.Player; -import org.bukkit.event.HandlerList; - -/** - * Note: This event has been replaced with {@link ResidenceChangedEvent} and is marked as - * deprecated as of 21-MAY-2013. It will be removed in future releases. Please see - * {@link ResidenceChangedEvent} comments for further information. - * - * TODO - Remove this class at a suitable time in the future. - * - * @author Administrator - */ -@Deprecated -public class ResidenceEnterEvent extends ResidencePlayerEvent { - - private static final HandlerList handlers = new HandlerList(); - @Override - public HandlerList getHandlers() { - return handlers; - } - - public static HandlerList getHandlerList() { - return handlers; - } - - public ResidenceEnterEvent(ClaimedResidence resref, Player player) - { - super("RESIDENCE_ENTER", resref, player); - } -} diff --git a/src/com/bekvon/bukkit/residence/event/ResidenceLeaveEvent.java b/src/com/bekvon/bukkit/residence/event/ResidenceLeaveEvent.java deleted file mode 100644 index 7edca7e..0000000 --- a/src/com/bekvon/bukkit/residence/event/ResidenceLeaveEvent.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * To change this template, choose Tools | Templates - * and open the template in the editor. - */ - -package com.bekvon.bukkit.residence.event; - -import com.bekvon.bukkit.residence.protection.ClaimedResidence; -import org.bukkit.entity.Player; -import org.bukkit.event.HandlerList; - -/** - * Note: This event has been replaced with {@link ResidenceChangedEvent} and is marked as - * deprecated as of 21-MAY-2013. It will be removed in future releases. Please see - * {@link ResidenceChangedEvent} comments for further information. - * - * TODO - Remove this class at a suitable time in the future. - * - * @author Administrator - */ -@Deprecated -public class ResidenceLeaveEvent extends ResidencePlayerEvent { - - private static final HandlerList handlers = new HandlerList(); - @Override - public HandlerList getHandlers() { - return handlers; - } - - public static HandlerList getHandlerList() { - return handlers; - } - - public ResidenceLeaveEvent(ClaimedResidence resref, Player player) - { - super("RESIDENCE_LEAVE", resref, player); - } -} diff --git a/src/com/bekvon/bukkit/residence/listeners/ResidencePlayerListener.java b/src/com/bekvon/bukkit/residence/listeners/ResidencePlayerListener.java index 76d00af..9c4f6d4 100644 --- a/src/com/bekvon/bukkit/residence/listeners/ResidencePlayerListener.java +++ b/src/com/bekvon/bukkit/residence/listeners/ResidencePlayerListener.java @@ -41,8 +41,6 @@ import org.bukkit.plugin.Plugin; import com.bekvon.bukkit.residence.Residence; import com.bekvon.bukkit.residence.chat.ChatChannel; import com.bekvon.bukkit.residence.event.ResidenceChangedEvent; -import com.bekvon.bukkit.residence.event.ResidenceEnterEvent; -import com.bekvon.bukkit.residence.event.ResidenceLeaveEvent; import com.bekvon.bukkit.residence.permissions.PermissionGroup; import com.bekvon.bukkit.residence.protection.ClaimedResidence; import com.bekvon.bukkit.residence.protection.FlagPermissions; @@ -126,13 +124,6 @@ public class ResidencePlayerListener implements Listener { lastOutsideLoc.put(pname, loc); if (ResOld != null) { String leave = ResOld.getLeaveMessage(); - /* - * TODO - ResidenceLeaveEvent is deprecated as of 21-MAY-2013. Its functionality is - * replaced by ResidenceChangedEvent. For now, this event is still supported until - * it is removed at a suitable time in the future. - */ - ResidenceLeaveEvent leaveevent = new ResidenceLeaveEvent(ResOld, player); - Residence.getServ().getPluginManager().callEvent(leaveevent); // New ResidenceChangeEvent ResidenceChangedEvent chgEvent = new ResidenceChangedEvent(ResOld, null, player); @@ -182,14 +173,6 @@ public class ResidencePlayerListener implements Listener { String leave = ResOld.getLeaveMessage(); chgFrom = ResOld; - /* - * TODO - ResidenceLeaveEvent is deprecated as of 21-MAY-2013. Its functionality is - * replaced by ResidenceChangedEvent. For now, this event is still supported until - * it is removed at a suitable time in the future. - */ - ResidenceLeaveEvent leaveevent = new ResidenceLeaveEvent(ResOld, player); - Residence.getServ().getPluginManager().callEvent(leaveevent); - if (leave != null && !leave.equals("") && ResOld != res.getParent()) { if (Residence.getConfigManager().useActionBar()) { ActionBar.send(player, (new StringBuilder()).append(ChatColor.YELLOW) @@ -203,14 +186,6 @@ public class ResidencePlayerListener implements Listener { } String enterMessage = res.getEnterMessage(); - /* - * TODO - ResidenceEnterEvent is deprecated as of 21-MAY-2013. Its functionality is - * replaced by ResidenceChangedEvent. For now, this event is still supported until it is - * removed at a suitable time in the future. - */ - ResidenceEnterEvent enterevent = new ResidenceEnterEvent(res, player); - Residence.getServ().getPluginManager().callEvent(enterevent); - // New ResidenceChangedEvent ResidenceChangedEvent chgEvent = new ResidenceChangedEvent(chgFrom, res, player); Residence.getServ().getPluginManager().callEvent(chgEvent); @@ -221,8 +196,8 @@ public class ResidencePlayerListener implements Listener { ActionBar.send( player, (new StringBuilder()).append(ChatColor.YELLOW) - .append(insertMessages(player, areaname, res, enterMessage)) - .toString()); + .append(insertMessages(player, areaname, res, enterMessage)) + .toString()); } else { player.sendMessage(ChatColor.YELLOW + this.insertMessages(player, areaname, res, enterMessage)); @@ -270,7 +245,7 @@ public class ResidencePlayerListener implements Listener { || mat == Material.PISTON_STICKY_BASE || mat == Material.DRAGON_EGG || Residence.getConfigManager().getCustomBothClick() - .contains(Integer.valueOf(block.getTypeId())); + .contains(Integer.valueOf(block.getTypeId())); } private boolean isCanUseEntity_RClickOnly(Material mat, Block block) { @@ -289,14 +264,14 @@ public class ResidencePlayerListener implements Listener { || mat == Material.BREWING_STAND || mat == Material.ENCHANTMENT_TABLE || Residence.getConfigManager().getCustomRightClick() - .contains(Integer.valueOf(block.getTypeId())); + .contains(Integer.valueOf(block.getTypeId())); } private boolean isContainer(Material mat, Block block) { return FlagPermissions.getMaterialUseFlagList().containsKey(mat) && FlagPermissions.getMaterialUseFlagList().get(mat).equals("container") || Residence.getConfigManager().getCustomContainers() - .contains(Integer.valueOf(block.getTypeId())); + .contains(Integer.valueOf(block.getTypeId())); } @EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true) @@ -440,16 +415,16 @@ public class ResidencePlayerListener implements Listener { player.sendMessage(ChatColor.GREEN + Residence.getLanguage().getPhrase("SelectPoint", Residence.getLanguage().getPhrase("Primary")) - + ChatColor.RED + "(" + loc.getBlockX() + "," + loc.getBlockY() - + "," + loc.getBlockZ() + ")" + ChatColor.GREEN + "!"); + + ChatColor.RED + "(" + loc.getBlockX() + "," + loc.getBlockY() + + "," + loc.getBlockZ() + ")" + ChatColor.GREEN + "!"); } else if (event.getAction() == Action.RIGHT_CLICK_BLOCK) { Location loc = block.getLocation(); Residence.getSelectionManager().placeLoc2(player, loc); player.sendMessage(ChatColor.GREEN + Residence.getLanguage().getPhrase("SelectPoint", Residence.getLanguage().getPhrase("Secondary")) - + ChatColor.RED + "(" + loc.getBlockX() + "," + loc.getBlockY() - + "," + loc.getBlockZ() + ")" + ChatColor.GREEN + "!"); + + ChatColor.RED + "(" + loc.getBlockX() + "," + loc.getBlockY() + + "," + loc.getBlockZ() + ")" + ChatColor.GREEN + "!"); } } } @@ -476,7 +451,7 @@ public class ResidencePlayerListener implements Listener { || player.getItemInHand().getData().getData() == 3 && block.getTypeId() == 17 && (block.getData() == 3 || block.getData() == 7 - || block.getData() == 11 || block.getData() == 15)) { + || block.getData() == 11 || block.getData() == 15)) { perms = Residence.getPermsByLocForPlayer( block.getRelative(event.getBlockFace()).getLocation(), player);