mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-12-28 03:57:39 +01:00
Removed constants class for now. It's not needed.
This commit is contained in:
parent
4d4c8da912
commit
48883bb75f
@ -48,7 +48,6 @@ public class AddonClassLoader extends URLClassLoader {
|
||||
throw new InvalidAddonFormatException("Packages declaration cannot start with 'world.bentobox'");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
throw new InvalidDescriptionException("Could not load '" + path.getName() + "' in folder '" + path.getParent() + "' - " + e.getMessage());
|
||||
}
|
||||
|
||||
|
@ -120,8 +120,8 @@ public abstract class CompositeCommand extends Command implements PluginIdentifi
|
||||
plugin.getCommandsManager().registerCommand(this);
|
||||
}
|
||||
// Default references to description and parameters
|
||||
///setDescription("commands." + label + ".description");
|
||||
//setParameters("commands." + label + ".parameters");
|
||||
setDescription("commands." + label + ".description");
|
||||
setParameters("commands." + label + ".parameters");
|
||||
setup();
|
||||
if (!getSubCommand("help").isPresent() && !label.equals("help")) {
|
||||
new DefaultHelpCommand(this);
|
||||
@ -164,15 +164,18 @@ public abstract class CompositeCommand extends Command implements PluginIdentifi
|
||||
// Inherit world
|
||||
this.world = parent.getWorld();
|
||||
// Default references to description and parameters
|
||||
|
||||
StringBuilder reference = new StringBuilder();
|
||||
reference.append("commands");
|
||||
/*
|
||||
String reference = "";
|
||||
for (CompositeCommand p = this ; p != null ; p = getParent()) {
|
||||
for (CompositeCommand p = this ; p != null && p != this; p = getParent()) {
|
||||
reference = "." + p.getLabel() + reference;
|
||||
}
|
||||
reference = "commands" + reference;
|
||||
*/
|
||||
|
||||
setDescription(reference + ".description");
|
||||
setParameters(reference + ".parameters");
|
||||
*/
|
||||
|
||||
setup();
|
||||
// If this command does not define its own help class, then use the default help command
|
||||
if (!getSubCommand("help").isPresent() && !label.equals("help")) {
|
||||
|
@ -25,7 +25,6 @@ import org.bukkit.material.TrapDoor;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import world.bentobox.bentobox.BentoBox;
|
||||
import world.bentobox.bentobox.Constants;
|
||||
import world.bentobox.bentobox.api.user.User;
|
||||
import world.bentobox.bentobox.database.BSBDatabase;
|
||||
import world.bentobox.bentobox.database.objects.Island;
|
||||
@ -43,6 +42,8 @@ import world.bentobox.bentobox.util.teleport.SafeTeleportBuilder;
|
||||
*/
|
||||
public class IslandsManager {
|
||||
|
||||
private static final String SPAWNCOMMAND = "spawn";
|
||||
|
||||
private BentoBox plugin;
|
||||
|
||||
/**
|
||||
@ -680,7 +681,7 @@ public class IslandsManager {
|
||||
// go to island spawn
|
||||
player.teleport(spawn.get(island.getWorld()).getSpawnPoint(island.getWorld().getEnvironment()));
|
||||
} else {
|
||||
if (!player.performCommand(Constants.SPAWNCOMMAND)) {
|
||||
if (!player.performCommand(SPAWNCOMMAND)) {
|
||||
plugin.logWarning("During island deletion player " + player.getName() + " could not be sent to spawn so was dropped, sorry.");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user