diff --git a/README b/README index 779a308..206aa0b 100644 --- a/README +++ b/README @@ -160,6 +160,8 @@ destMemory - Whether to set the first destination as the last used destination f ignoreEntrance - Set this option to true to not check the entrance of a gate on startup. This is a workaround for snowmen breaking gates. handleVehicles - Whether or not to handle vehicles going through gates. Set to false to disallow vehicles (Manned or not) going through gates. sortLists - If true, network lists will be sorted alphabetically. +protectEntrance - If true, will protect from users breaking gate entrance blocks (This is more resource intensive than the usual check, and should only be enabled for servers that use solid open/close blocks) +signColor: This allows you to specify the color of the gate signs. Valid colors: debug - Whether to show massive debug output permdebug - Whether to show massive permission debug output @@ -202,8 +204,14 @@ createConflict=Gate conflicts with existing gate ============= Changes ============= +[Version 0.7.6.2] + - Button now activates if gate is opened, allowing redstone interaction + - Fixed issue with sign line lengths. All sign text should now fit with color codes. [Version 0.7.6.1] - - API update to support StargateCommand + - Update API for StargateCommand + - Resolved issue with block data on explosion + - Added signColor option + - Added protectEntrance option [Version 0.7.6] - Moved gate opening/closing to a Queue/Runnable system to resolve server lag issues with very large gates [Version 0.7.5.11] diff --git a/src/net/TheDgtl/Stargate/Portal.java b/src/net/TheDgtl/Stargate/Portal.java index af4424f..2432ae3 100644 --- a/src/net/TheDgtl/Stargate/Portal.java +++ b/src/net/TheDgtl/Stargate/Portal.java @@ -380,6 +380,9 @@ public class Portal { } public boolean isOpenFor(Player player) { + if (!isOpen) { + return false; + } if ((isAlwaysOn()) || (this.player == null)) { return true; } @@ -624,27 +627,27 @@ public class Portal { return; } Sign sign = (Sign)id.getBlock().getState(); - Stargate.setLine(sign, 0, "--" + name + "--"); + Stargate.setLine(sign, 0, "-" + name + "-"); int max = destinations.size() - 1; int done = 0; if (!isActive()) { - Stargate.setLine(sign, ++done, "Right click to"); - Stargate.setLine(sign, ++done, "use the gate"); + Stargate.setLine(sign, ++done, "Right click"); + Stargate.setLine(sign, ++done, "to use gate"); if (!noNetwork) { - Stargate.setLine(sign, ++done, " (" + network + ") "); + Stargate.setLine(sign, ++done, "(" + network + ")"); } } else { if (isFixed()) { - Stargate.setLine(sign, ++done, "To: " + destination); + Stargate.setLine(sign, ++done, ">" + destination + "<"); if (noNetwork) { Stargate.setLine(sign, ++done, ""); } else { - Stargate.setLine(sign, ++done, " (" + network + ") "); + Stargate.setLine(sign, ++done, "(" + network + ")"); } Portal dest = Portal.getByName(destination, network); if (dest == null) { - Stargate.setLine(sign, ++done, "(Not Connected)"); + Stargate.setLine(sign, ++done, "Disconnected"); } else { Stargate.setLine(sign, ++done, ""); } @@ -672,7 +675,7 @@ public class Portal { if (iConomyHandler.useiConomy() && iConomyHandler.freeGatesGreen) { Portal dest = Portal.getByName(destination, network); boolean green = Stargate.isFree(activePlayer, this, dest); - Stargate.setLine(sign, done, (green ? ChatColor.DARK_GREEN : "") + " >" + destination + "< "); + Stargate.setLine(sign, done, (green ? ChatColor.DARK_GREEN : "") + ">" + destination + "<"); } else { Stargate.setLine(sign, done, " >" + destination + "< "); } diff --git a/src/net/TheDgtl/Stargate/Stargate.java b/src/net/TheDgtl/Stargate/Stargate.java index 1b031fb..a4375cb 100644 --- a/src/net/TheDgtl/Stargate/Stargate.java +++ b/src/net/TheDgtl/Stargate/Stargate.java @@ -827,7 +827,11 @@ public class Stargate extends JavaPlugin { Stargate.sendMessage(player, Stargate.getString("denyMsg")); return; } + openPortal(player, portal); + if (portal.isOpenFor(player)) { + event.setUseInteractedBlock(Result.ALLOW); + } } return; } diff --git a/src/plugin.yml b/src/plugin.yml index 698e806..58dd264 100644 --- a/src/plugin.yml +++ b/src/plugin.yml @@ -1,6 +1,6 @@ name: Stargate main: net.TheDgtl.Stargate.Stargate -version: 0.7.6.1 +version: 0.7.6.2 description: Stargate mod for Bukkit author: Drakia website: http://www.thedgtl.net