From a088b2b3d20591d4e28e46a7103fb9e0cd90a3a7 Mon Sep 17 00:00:00 2001 From: Steven Scott Date: Sun, 27 Nov 2011 19:54:14 -0800 Subject: [PATCH] [Version 0.7.2] - Make it so you can still destroy gates in Survival mode --- README | 2 ++ src/net/TheDgtl/Stargate/Stargate.java | 10 ++++++++-- src/plugin.yml | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/README b/README index 411a3cd..7c71307 100644 --- a/README +++ b/README @@ -197,6 +197,8 @@ createConflict=Gate conflicts with existing gate ============= Changes ============= +[Version 0.7.2] + - Make it so you can still destroy gates in Survival mode [Version 0.7.1] - Added destMemory option - Switched to sign.update() as Bukkit implemented my fix diff --git a/src/net/TheDgtl/Stargate/Stargate.java b/src/net/TheDgtl/Stargate/Stargate.java index c835958..d6ff8c3 100644 --- a/src/net/TheDgtl/Stargate/Stargate.java +++ b/src/net/TheDgtl/Stargate/Stargate.java @@ -7,6 +7,7 @@ import java.util.logging.Level; import java.util.logging.Logger; import org.bukkit.ChatColor; +import org.bukkit.GameMode; import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.Server; @@ -770,7 +771,10 @@ public class Stargate extends JavaPlugin { if (portal == null) return; event.setUseInteractedBlock(Result.DENY); - event.setCancelled(true); + // Only cancel event in creative mode + if (player.getGameMode().equals(GameMode.CREATIVE)) { + event.setCancelled(true); + } if (!Stargate.canAccessNetwork(player, portal.getNetwork())) { Stargate.sendMessage(player, Stargate.getString("denyMsg")); @@ -789,7 +793,9 @@ public class Stargate extends JavaPlugin { if (portal == null) return; event.setUseInteractedBlock(Result.DENY); - event.setCancelled(true); + if (player.getGameMode().equals(GameMode.CREATIVE)) { + event.setCancelled(true); + } if (!Stargate.canAccessNetwork(player, portal.getNetwork())) { Stargate.sendMessage(player, Stargate.getString("denyMsg")); diff --git a/src/plugin.yml b/src/plugin.yml index a22c5d8..3c135a3 100644 --- a/src/plugin.yml +++ b/src/plugin.yml @@ -1,6 +1,6 @@ name: Stargate main: net.TheDgtl.Stargate.Stargate -version: 0.7.1 +version: 0.7.2 description: Stargate mod for Bukkit author: Drakia website: http://www.thedgtl.net