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);
|
MassiveCoreBukkitCommand command = new MassiveCoreBukkitCommand(name, target);
|
||||||
|
|
||||||
// ... and finally register it.
|
// ... and finally register it.
|
||||||
Plugin plugin = massiveCurrent.getRegisteredPlugin();
|
Plugin plugin = command.getPlugin();
|
||||||
String pluginName = plugin != null ? plugin.getName() : "MassiveCore";
|
String pluginName = (plugin != null ? plugin.getName() : "MassiveCore");
|
||||||
simpleCommandMap.register(pluginName, command);
|
simpleCommandMap.register(pluginName, command);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.massivecraft.massivecore.collections;
|
package com.massivecraft.massivecore.collections;
|
||||||
|
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
|
import org.bukkit.entity.Entity;
|
||||||
|
|
||||||
import com.massivecraft.massivecore.CaseInsensitiveComparator;
|
import com.massivecraft.massivecore.CaseInsensitiveComparator;
|
||||||
|
|
||||||
@ -29,4 +30,9 @@ public class WorldExceptionSet
|
|||||||
return this.contains(world.getName());
|
return this.contains(world.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean contains(Entity entity)
|
||||||
|
{
|
||||||
|
return this.contains(entity.getWorld());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user