PneumatiCraft / OpenWarp

Teleportation plugin for Minecraft
http://openwarp.lithium3141.com
5 stars 1 forks source link

Don't redefine home access permissions on home reset #15

Closed timothyekl closed 13 years ago

timothyekl commented 13 years ago

Currently, setting a home after one has already been set throws an IllegalAccessException, as the permission is unconditionally added (and collides with an existing permission). This should not happen.

17:46:21 [SEVERE] null
org.bukkit.command.CommandException: Unhandled exception executing command 'home' in plugin OpenWarp v1.0 (rev b3ba85ab9f77e1468737f444000233f5ba17081d)
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:129)
        at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:322)
        at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:718)
        at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:682)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:675)
        at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:86)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:454)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:363)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
Caused by: java.lang.IllegalArgumentException: The permission openwarp.home.access.beisa3 is already defined!
        at org.bukkit.plugin.SimplePluginManager.addPermission(SimplePluginManager.java:423)
        at com.lithium3141.OpenWarp.commands.OWHomeSetCommand.runCommand(OWHomeSetCommand.java:43)
        at com.pneumaticraft.commandhandler.CommandHandler.checkAndRunCommand(CommandHandler.java:240)
        at com.pneumaticraft.commandhandler.CommandHandler.processFoundCommands(CommandHandler.java:110)
        at com.pneumaticraft.commandhandler.CommandHandler.locateAndRunCommand(CommandHandler.java:65)
        at com.lithium3141.OpenWarp.OpenWarp.onCommand(OpenWarp.java:314)
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
timothyekl commented 13 years ago

Fixed in 3f2d1e003