[Version 0.7.3.3]

- Added "ignoreEntrance" option to not check entrance to gate on
integrity check (Workaround for snowmen until event is pulled)
This commit is contained in:
Steven Scott 2011-12-12 22:01:52 -08:00
parent 48cb69447d
commit 89491a5c26
5 changed files with 27 additions and 4 deletions

3
README
View File

@ -155,6 +155,7 @@ toowner - Whether the money from gate-use goes to the owner or nobody
maxgates - If non-zero, will define the maximum amount of gates allowed on any network.
lang - The language to use (Included languages: en, de)
destMemory - Whether to set the first destination as the last used destination for all gates
ignoreEntrance - Set this option to true to not check the entrance of a gate on startup. This is a workaround for snowmen breaking gates.
debug - Whether to show massive debug output
permdebug - Whether to show massive permission debug output
@ -197,6 +198,8 @@ createConflict=Gate conflicts with existing gate
=============
Changes
=============
[Version 0.7.3.3]
- Added "ignoreEntrance" option to not check entrance to gate on integrity check (Workaround for snowmen until event is pulled)
[Version 0.7.3.2]
- Actually fixed "><" issue with destMemory
[Version 0.7.3.1]

View File

@ -15,6 +15,8 @@ maxgates: 0
lang: en
# Whether to remember the cursor location between uses
destMemory: false
# Ignore the entrance blocks of a gate when checking. Used to work around snowmen
ignoreEntrance: false
# Stargate economy options

View File

@ -227,6 +227,9 @@ public class Gate {
int id = types.get(layout[y][x]);
if (id == ENTRANCE || id == EXIT) {
// TODO: Remove once snowmanTrailEvent is added
if (Stargate.ignoreEntrance) continue;
int type = topleft.modRelative(x, y, 0, modX, 1, modZ).getType();
if (type != portalBlockClosed && type != portalBlockOpen) {
// Special case for water gates

View File

@ -84,6 +84,9 @@ public class Stargate extends JavaPlugin {
private static int openTime = 10;
public static boolean destMemory = false;
// Temp workaround for snowmen, don't check gate entrance
public static boolean ignoreEntrance = false;
// Used for debug
public static boolean debug = false;
public static boolean permDebug = false;
@ -134,11 +137,14 @@ public class Stargate extends JavaPlugin {
pm.registerEvent(Event.Type.BLOCK_BREAK, blockListener, Priority.Normal, this);
pm.registerEvent(Event.Type.SIGN_CHANGE, blockListener, Priority.Normal, this);
pm.registerEvent(Event.Type.VEHICLE_MOVE, vehicleListener, Priority.Normal, this);
pm.registerEvent(Event.Type.WORLD_LOAD, worldListener, Priority.Normal, this);
pm.registerEvent(Event.Type.ENTITY_EXPLODE, entityListener, Priority.Normal, this);
// TODO: Add when snowmanTrailEvent is pulled
//pm.registerEvent(Event.Type.SNOWMAN_TRAIL, entityListener, Priority.Normal, this);
//pm.registerEvent(Event.Type.ENTITY_DAMAGE, entityListener, Priority.Normal, this);
//pm.registerEvent(Event.Type.ENTITY_COMBUST, entityListener, Priority.Normal, this);
@ -166,6 +172,7 @@ public class Stargate extends JavaPlugin {
maxGates = newConfig.getInt("maxgates");
langName = newConfig.getString("lang");
destMemory = newConfig.getBoolean("destMemory");
ignoreEntrance = newConfig.getBoolean("ignoreEntrance");
// Debug
debug = newConfig.getBoolean("debug");
permDebug = newConfig.getBoolean("permdebug");
@ -882,9 +889,8 @@ public class Stargate extends JavaPlugin {
@Override
public void onBlockPhysics(BlockPhysicsEvent event) {
Block block = event.getBlock();
if (block.getType() == Material.PORTAL) {
event.setCancelled((Portal.getByEntrance(block) != null));
}
Portal portal = Portal.getByEntrance(block);
if (portal != null) event.setCancelled(true);
}
@Override
@ -924,6 +930,15 @@ public class Stargate extends JavaPlugin {
}
}
}
// TODO: Uncomment when Bukkit pulls SnowmanTrailEvent
/*
@Override
public void onSnowmanTrail(SnowmanTrailEvent event) {
Portal p = Portal.getByEntrance(event.getBlock());
if (p != null) event.setCancelled(true);
}
*/
// Going to leave this commented out until they fix EntityDamagebyBlock
/*
@Override

View File

@ -1,6 +1,6 @@
name: Stargate
main: net.TheDgtl.Stargate.Stargate
version: 0.7.3.2
version: 0.7.3.3
description: Stargate mod for Bukkit
author: Drakia
website: http://www.thedgtl.net