Fix a bug in choosing the plugin name for MassiveCommand and add contains entity to WorldExceptionSet.

This commit is contained in:
Olof Larsson 2015-03-25 19:22:51 +01:00
parent ce7a9a2226
commit 17e053b0b1
2 changed files with 8 additions and 2 deletions

View File

@ -109,8 +109,8 @@ public class MassiveCoreEngineCommandRegistration extends EngineAbstract
MassiveCoreBukkitCommand command = new MassiveCoreBukkitCommand(name, target);
// ... and finally register it.
Plugin plugin = massiveCurrent.getRegisteredPlugin();
String pluginName = plugin != null ? plugin.getName() : "MassiveCore";
Plugin plugin = command.getPlugin();
String pluginName = (plugin != null ? plugin.getName() : "MassiveCore");
simpleCommandMap.register(pluginName, command);
}

View File

@ -1,6 +1,7 @@
package com.massivecraft.massivecore.collections;
import org.bukkit.World;
import org.bukkit.entity.Entity;
import com.massivecraft.massivecore.CaseInsensitiveComparator;
@ -29,4 +30,9 @@ public class WorldExceptionSet
return this.contains(world.getName());
}
public boolean contains(Entity entity)
{
return this.contains(entity.getWorld());
}
}