mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-24 22:14:44 +00:00
Proper Reformating
This commit is contained in:
1 parent
ce75880aba
commit
180d257024
1179 files changed
+59847
-61583
No files matched your search
@@ -34,28 +34,28 @@ public class CommandProfileRemove extends CommandProfileBase {
|
||||
|
||||
@Override
|
||||
public void processCommand(ICommandSender sender, String[] args) throws CommandException {
|
||||
if(!(sender instanceof EntityPlayer)) {
|
||||
if (!(sender instanceof EntityPlayer)) {
|
||||
sendError(sender, "This command can only be used by a player.");
|
||||
return;
|
||||
}
|
||||
if(args.length < 1) {
|
||||
if (args.length < 1) {
|
||||
sendError(sender, "Usage: " + getUsage());
|
||||
return;
|
||||
}
|
||||
int slotId;
|
||||
try {
|
||||
slotId = Integer.parseInt(args[0]);
|
||||
} catch(NumberFormatException ex) {
|
||||
} catch (NumberFormatException ex) {
|
||||
sendError(sender, "Slot ID must be a number: " + args[0]);
|
||||
return;
|
||||
}
|
||||
EntityPlayer player = (EntityPlayer)sender;
|
||||
EntityPlayer player = (EntityPlayer) sender;
|
||||
ProfileOperation result = ProfileController.Instance.removeSlot(player, slotId);
|
||||
if(result.getResult() == EnumProfileOperation.SUCCESS) {
|
||||
if (result.getResult() == EnumProfileOperation.SUCCESS) {
|
||||
sendResult(sender, "Successfully removed slot %d from your profile.", slotId);
|
||||
} else if(result.getResult() == EnumProfileOperation.LOCKED) {
|
||||
} else if (result.getResult() == EnumProfileOperation.LOCKED) {
|
||||
sendError(sender, "Profile is locked. Details: %s", result.getMessage());
|
||||
} else if(result.getResult() == EnumProfileOperation.ERROR) {
|
||||
} else if (result.getResult() == EnumProfileOperation.ERROR) {
|
||||
sendError(sender, "Error removing slot: %s", result.getMessage());
|
||||
} else {
|
||||
sendError(sender, "Unexpected error: %s", result.getMessage());
|
||||
|
||||
Reference in new issue
Block a user