mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-12-28 20:17:40 +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'");
|
throw new InvalidAddonFormatException("Packages declaration cannot start with 'world.bentobox'");
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
|
||||||
throw new InvalidDescriptionException("Could not load '" + path.getName() + "' in folder '" + path.getParent() + "' - " + e.getMessage());
|
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);
|
plugin.getCommandsManager().registerCommand(this);
|
||||||
}
|
}
|
||||||
// Default references to description and parameters
|
// Default references to description and parameters
|
||||||
///setDescription("commands." + label + ".description");
|
setDescription("commands." + label + ".description");
|
||||||
//setParameters("commands." + label + ".parameters");
|
setParameters("commands." + label + ".parameters");
|
||||||
setup();
|
setup();
|
||||||
if (!getSubCommand("help").isPresent() && !label.equals("help")) {
|
if (!getSubCommand("help").isPresent() && !label.equals("help")) {
|
||||||
new DefaultHelpCommand(this);
|
new DefaultHelpCommand(this);
|
||||||
@ -164,15 +164,18 @@ public abstract class CompositeCommand extends Command implements PluginIdentifi
|
|||||||
// Inherit world
|
// Inherit world
|
||||||
this.world = parent.getWorld();
|
this.world = parent.getWorld();
|
||||||
// Default references to description and parameters
|
// Default references to description and parameters
|
||||||
|
|
||||||
|
StringBuilder reference = new StringBuilder();
|
||||||
|
reference.append("commands");
|
||||||
/*
|
/*
|
||||||
String reference = "";
|
for (CompositeCommand p = this ; p != null && p != this; p = getParent()) {
|
||||||
for (CompositeCommand p = this ; p != null ; p = getParent()) {
|
|
||||||
reference = "." + p.getLabel() + reference;
|
reference = "." + p.getLabel() + reference;
|
||||||
}
|
}
|
||||||
reference = "commands" + reference;
|
*/
|
||||||
|
|
||||||
setDescription(reference + ".description");
|
setDescription(reference + ".description");
|
||||||
setParameters(reference + ".parameters");
|
setParameters(reference + ".parameters");
|
||||||
*/
|
|
||||||
setup();
|
setup();
|
||||||
// If this command does not define its own help class, then use the default help command
|
// If this command does not define its own help class, then use the default help command
|
||||||
if (!getSubCommand("help").isPresent() && !label.equals("help")) {
|
if (!getSubCommand("help").isPresent() && !label.equals("help")) {
|
||||||
|
@ -25,7 +25,6 @@ import org.bukkit.material.TrapDoor;
|
|||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
import world.bentobox.bentobox.BentoBox;
|
import world.bentobox.bentobox.BentoBox;
|
||||||
import world.bentobox.bentobox.Constants;
|
|
||||||
import world.bentobox.bentobox.api.user.User;
|
import world.bentobox.bentobox.api.user.User;
|
||||||
import world.bentobox.bentobox.database.BSBDatabase;
|
import world.bentobox.bentobox.database.BSBDatabase;
|
||||||
import world.bentobox.bentobox.database.objects.Island;
|
import world.bentobox.bentobox.database.objects.Island;
|
||||||
@ -43,6 +42,8 @@ import world.bentobox.bentobox.util.teleport.SafeTeleportBuilder;
|
|||||||
*/
|
*/
|
||||||
public class IslandsManager {
|
public class IslandsManager {
|
||||||
|
|
||||||
|
private static final String SPAWNCOMMAND = "spawn";
|
||||||
|
|
||||||
private BentoBox plugin;
|
private BentoBox plugin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -680,7 +681,7 @@ public class IslandsManager {
|
|||||||
// go to island spawn
|
// go to island spawn
|
||||||
player.teleport(spawn.get(island.getWorld()).getSpawnPoint(island.getWorld().getEnvironment()));
|
player.teleport(spawn.get(island.getWorld()).getSpawnPoint(island.getWorld().getEnvironment()));
|
||||||
} else {
|
} 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.");
|
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