mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-12-28 03:57:39 +01:00
Fixed minor code smells
This commit is contained in:
parent
20116ff287
commit
5b7502d83f
@ -22,16 +22,12 @@ public class BentoBoxAboutCommand extends CompositeCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setup() {
|
public void setup() {
|
||||||
|
// Useless : this command uses the default values.
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean execute(User user, String label, List<String> args) {
|
public boolean execute(User user, String label, List<String> args) {
|
||||||
user.sendRawMessage("About " + BentoBox
|
user.sendRawMessage("About " + BentoBox.getInstance().getDescription().getName() + " v" + BentoBox.getInstance().getDescription().getVersion() + ":");
|
||||||
.getInstance()
|
|
||||||
.getDescription()
|
|
||||||
.getName() + " v" +
|
|
||||||
BentoBox.getInstance().getDescription().getVersion() + ":");
|
|
||||||
user.sendRawMessage("Copyright (c) 2017 - 2018 Tastybento, Poslovitch");
|
user.sendRawMessage("Copyright (c) 2017 - 2018 Tastybento, Poslovitch");
|
||||||
user.sendRawMessage("See https://www.eclipse.org/legal/epl-2.0/ for license information.");
|
user.sendRawMessage("See https://www.eclipse.org/legal/epl-2.0/ for license information.");
|
||||||
return true;
|
return true;
|
||||||
|
@ -23,7 +23,7 @@ public class BentoBoxVersionCommand extends CompositeCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setup() {
|
public void setup() {
|
||||||
|
// Useless : this command uses the default values.
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -49,21 +49,19 @@ import world.bentobox.bentobox.api.user.User;
|
|||||||
import world.bentobox.bentobox.database.objects.Island;
|
import world.bentobox.bentobox.database.objects.Island;
|
||||||
import world.bentobox.bentobox.util.Util;
|
import world.bentobox.bentobox.util.Util;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author tastybento
|
||||||
|
*/
|
||||||
public class Clipboard {
|
public class Clipboard {
|
||||||
|
|
||||||
|
// Commonly used texts along this class.
|
||||||
private static final String ATTACHED = "attached";
|
private static final String ATTACHED = "attached";
|
||||||
|
|
||||||
private static final String BLOCK = "blocks";
|
private static final String BLOCK = "blocks";
|
||||||
|
|
||||||
private static final String LOAD_ERROR = "Could not load schems file - does not exist : ";
|
|
||||||
|
|
||||||
private static final String BEDROCK = "bedrock";
|
private static final String BEDROCK = "bedrock";
|
||||||
|
|
||||||
private static final String INVENTORY = "inventory";
|
private static final String INVENTORY = "inventory";
|
||||||
|
|
||||||
private static final String ENTITY = "entity";
|
private static final String ENTITY = "entity";
|
||||||
|
|
||||||
private static final String COLOR = "color";
|
private static final String COLOR = "color";
|
||||||
|
private static final String LOAD_ERROR = "Could not load schems file - does not exist : ";
|
||||||
|
|
||||||
private YamlConfiguration blockConfig = new YamlConfiguration();
|
private YamlConfiguration blockConfig = new YamlConfiguration();
|
||||||
private Location pos1;
|
private Location pos1;
|
||||||
@ -289,14 +287,10 @@ public class Clipboard {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (e instanceof AbstractHorse) {
|
if (e instanceof AbstractHorse) {
|
||||||
AbstractHorse horse = (AbstractHorse)e;
|
Horse horse = (Horse)e;
|
||||||
horse.setDomestication(ent.getInt("domestication"));
|
horse.setDomestication(ent.getInt("domestication"));
|
||||||
ConfigurationSection inv = ent.getConfigurationSection(INVENTORY);
|
ConfigurationSection inv = ent.getConfigurationSection(INVENTORY);
|
||||||
inv.getKeys(false).forEach(i -> horse.getInventory().setItem(Integer.valueOf(i), (ItemStack)inv.get(i)));
|
inv.getKeys(false).forEach(i -> horse.getInventory().setItem(Integer.valueOf(i), (ItemStack)inv.get(i)));
|
||||||
}
|
|
||||||
|
|
||||||
if (e instanceof AbstractHorse) {
|
|
||||||
Horse horse = (Horse)e;
|
|
||||||
horse.setStyle(Horse.Style.valueOf(ent.getString("style", "NONE")));
|
horse.setStyle(Horse.Style.valueOf(ent.getString("style", "NONE")));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user