mavenization

gitignore added maven target/ and intellij project stuff
simplified a return statement in PluginPlayerListener
added TODO in LocationSerializer (creating a world should not be done
there)
This commit is contained in:
Paul Schulze
2012-09-30 12:41:02 +02:00
parent 9e3b6a6cdb
commit 139bfc7d54
5 changed files with 57 additions and 15 deletions

View File

@ -72,14 +72,6 @@ public class PluginPlayerListener extends BaseLocationListener implements Listen
protected boolean hasPermission(Player player) {
if (player.hasPermission(Plugin.permissionUse)) {
return true;
}
if (player.hasPermission(Plugin.permissionAll)) {
return true;
}
return false;
}
return player.hasPermission(Plugin.permissionUse) || player.hasPermission(Plugin.permissionAll);
}
}

View File

@ -24,7 +24,10 @@ public class LocationSerializer
protected static World getWorld(String name)
{
World world = Plugin.instance.getServer().getWorld(name);
// TODO: Creating a world silently in the background is not a good thing I think. No one expects a Gate
// Plugin to do that. It would be better to handle gates which point to non-existing worlds safely (not
// teleporting at all)
if (world == null) {
world = Plugin.instance.getServer().createWorld(new WorldCreator(name).environment(Environment.NORMAL));
}

View File

@ -3,7 +3,7 @@ version: 1.1.1
description: A plugin to create gates for fast traveling.
author: tomco
authors: [oloflarsson, locutus, DrAgonmoray, s1m0ne, tomco]
website: http://www.craftinc.de/blog/?p=255
website: http://www.craftinc.de/ancient-gates/
main: org.mcteam.ancientgates.Plugin
database: false
@ -25,6 +25,4 @@ permissions:
ancientgates.use:
description: Allows you to use open gates.
acientgates.manage:
description: Gives access to commands manipulating gates.
description: Gives access to commands manipulating gates.