Fix a bug in choosing the plugin name for MassiveCommand and add contains entity to WorldExceptionSet.
This commit is contained in:
parent
ce7a9a2226
commit
17e053b0b1
@ -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);
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.massivecraft.massivecore.collections;
|
||||
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Entity;
|
||||
|
||||
import com.massivecraft.massivecore.CaseInsensitiveComparator;
|
||||
|
||||
@ -28,5 +29,10 @@ public class WorldExceptionSet
|
||||
{
|
||||
return this.contains(world.getName());
|
||||
}
|
||||
|
||||
public boolean contains(Entity entity)
|
||||
{
|
||||
return this.contains(entity.getWorld());
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user