From c8764c609196d1747a8b92f0e43c99485f0688cc Mon Sep 17 00:00:00 2001 From: Steven Scott Date: Thu, 18 Aug 2011 23:41:50 -0700 Subject: [PATCH] Stop open gates from being destroyed on startup --- README | 2 ++ src/net/TheDgtl/Stargate/Gate.java | 3 ++- src/plugin.yml | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README b/README index 0685f89..f5700c5 100644 --- a/README +++ b/README @@ -146,6 +146,8 @@ maxgates - If non-zero, will define the maximum amount of gates allowed on any n ============= Changes ============= +[Version 0.6.1] + - Stop destruction of open gates on startup [Version 0.6.0] - Completely re-wrote Permission handling (REREAD/REDO YOUR PERMISSIONS!!!!!!!!) - Added custom Stargate events (See Stargate-DHD code for use) diff --git a/src/net/TheDgtl/Stargate/Gate.java b/src/net/TheDgtl/Stargate/Gate.java index d5efaa0..0ec634a 100644 --- a/src/net/TheDgtl/Stargate/Gate.java +++ b/src/net/TheDgtl/Stargate/Gate.java @@ -227,7 +227,8 @@ public class Gate { int id = types.get(layout[y][x]); if (id == ENTRANCE || id == EXIT) { - if (topleft.modRelative(x, y, 0, modX, 1, modZ).getType() != portalBlockClosed) { + int type = topleft.modRelative(x, y, 0, modX, 1, modZ).getType(); + if (type != portalBlockClosed && type != portalBlockOpen) { return false; } } else if (id != ANYTHING) { diff --git a/src/plugin.yml b/src/plugin.yml index cdb3247..cd11e74 100644 --- a/src/plugin.yml +++ b/src/plugin.yml @@ -1,6 +1,6 @@ name: Stargate main: net.TheDgtl.Stargate.Stargate -version: 0.6.0 +version: 0.6.1 description: Stargate mod for Bukkit author: Drakia website: http://www.thedgtl.net