mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-24 11:45:31 +01:00
Merge branch 'master' into develop
This commit is contained in:
commit
3e7307a56c
@ -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")) {
|
||||
|
@ -24,7 +24,6 @@ import org.bukkit.inventory.ItemStack;
|
||||
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;
|
||||
@ -42,6 +41,8 @@ import world.bentobox.bentobox.util.teleport.SafeTeleportBuilder;
|
||||
*/
|
||||
public class IslandsManager {
|
||||
|
||||
private static final String SPAWNCOMMAND = "spawn";
|
||||
|
||||
private BentoBox plugin;
|
||||
|
||||
/**
|
||||
@ -674,7 +675,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