Compare commits

..
6 Commits
5 changed files with 31 additions and 3 deletions

No files matched your search

+6
View File
@@ -1,3 +1,9 @@
2.0beta3:
- Fixed NullPointerException inside the ignite hook.
2.0beta2:
- Fixed a NullPointerException in the damage hook.
2.0beta1:
- Added area protection. Use /region or /rg to define regions.
+2
View File
@@ -51,6 +51,8 @@
<fileset dir="."/>
<globmapper from="*.txt" to="*.txt"/>
</copy>
<copy tofile="${release.dir}/worldguard.updatr" file="worldguard.updatr"/>
<replace file="${release.dir}/worldguard.updatr" token="%version%" value="${version}"/>
<copy file="worldguard.properties" todir="${release.dir}"/>
<copy tofile="${release.dir}/WorldGuard.jar" file="${dist.dir}/WorldGuard.jar"/>
<zip destfile="${release.dir}/worldguard-${version}.zip" basedir="${release.dir}" excludes="*.zip"/>
+16 -1
View File
@@ -45,7 +45,14 @@ public class WorldGuard extends Plugin {
* Initialize the plugin.
*/
public WorldGuard() {
listener = new WorldGuardListener(this);
try {
listener = new WorldGuardListener(this);
} catch (NoClassDefFoundError e) {
logger.severe("*** WORLDGUARD FAILED TO LOAD. ALL PROTECTION IS DISABLED!");
logger.severe("*** YOUR SERVER WILL BE SAVED AND STOPPED TO PREVENT DAMAGE TO YOUR WORLD. DISABLE WORLDGUARD OR CORRECT THE PROBLEM.");
logger.severe("*** WorldEdit must be placed into the plugins/ directory");
etc.getServer().useConsoleCommand("stop");
}
}
/**
@@ -53,6 +60,10 @@ public class WorldGuard extends Plugin {
*/
@Override
public void initialize() {
if (listener == null) {
return;
}
List<String> missingFeatures = new ArrayList<String>();
registerHook("COMMAND", PluginListener.Priority.MEDIUM);
@@ -110,6 +121,10 @@ public class WorldGuard extends Plugin {
*/
@Override
public void enable() {
if (listener == null) {
return;
}
logger.log(Level.INFO, "WorldGuard version " + getVersion() + " loaded");
listener.loadConfiguration();
+2 -2
View File
@@ -1192,7 +1192,7 @@ public class WorldGuardListener extends PluginListener {
}
}
if (useRegions && !player.canUseCommand("/regionbypass")) {
if (useRegions && player != null && !player.canUseCommand("/regionbypass")) {
Vector pt = new Vector(block.getX(),
block.getY(), block.getZ());
LocalPlayer localPlayer = new HMPlayer(player);
@@ -1474,7 +1474,7 @@ public class WorldGuardListener extends PluginListener {
return true;
}
if (attacker.isPlayer()) {
if (attacker != null && attacker.isPlayer()) {
if (useRegions) {
Vector pt = new Vector(defender.getX(),
defender.getY(), defender.getZ());
+5
View File
@@ -0,0 +1,5 @@
name = WorldGuard
version = %version%
url = updatr.update.sk89q.com/worldguard.updatr
file = cloud.github.com/downloads/sk89q/worldguard/worldguard-%version%.zip
notes =