mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-11 17:15:07 +02:00
Cleanup
This commit is contained in:
@@ -33,11 +33,12 @@ public class Commandbigtree extends EssentialsCommand
|
||||
@Override
|
||||
public void run(final IUser user, final String commandLabel, final String[] args) throws Exception
|
||||
{
|
||||
final TreeType tree = BIGTREE_PARSER.parse(args).getValue().getBukkitType();
|
||||
final BigTree bigTree = BIGTREE_PARSER.parse(args).getValue();
|
||||
final TreeType bukkitTree = bigTree.getBukkitType();
|
||||
|
||||
final Location loc = LocationUtil.getTarget(user.getPlayer());
|
||||
final Location safeLocation = LocationUtil.getSafeDestination(loc);
|
||||
final boolean success = user.getPlayer().getWorld().generateTree(safeLocation, tree);
|
||||
final boolean success = user.getPlayer().getWorld().generateTree(safeLocation, bukkitTree);
|
||||
if (success)
|
||||
{
|
||||
user.sendMessage(_("bigTreeSuccess"));
|
||||
|
@@ -20,6 +20,7 @@ public class IntegerConverter implements ArgumentsParser<Integer>, Serializer<In
|
||||
public ParserResult<Integer> parse(final String... args)
|
||||
{
|
||||
Validate.notEmpty(args);
|
||||
Validate.notEmpty(args[0]);
|
||||
try
|
||||
{
|
||||
final int number = Integer.parseInt(args[0]);
|
||||
|
Reference in New Issue
Block a user