cleanup: remove redundant cast
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
*/
|
||||
package client.command;
|
||||
|
||||
import client.MapleClient;
|
||||
import client.command.commands.gm0.*;
|
||||
import client.command.commands.gm1.*;
|
||||
import client.command.commands.gm2.*;
|
||||
@@ -30,18 +31,11 @@ import client.command.commands.gm3.*;
|
||||
import client.command.commands.gm4.*;
|
||||
import client.command.commands.gm5.*;
|
||||
import client.command.commands.gm6.*;
|
||||
|
||||
import client.MapleClient;
|
||||
|
||||
import tools.FilePrinter;
|
||||
import tools.Pair;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.HashMap;
|
||||
import java.util.*;
|
||||
|
||||
public class CommandsExecutor {
|
||||
|
||||
@@ -181,7 +175,7 @@ public class CommandsExecutor {
|
||||
}
|
||||
|
||||
private void registerLv0Commands(){
|
||||
levelCommandsCursor = new Pair<>((List<String>) new ArrayList<String>(), (List<String>) new ArrayList<String>());
|
||||
levelCommandsCursor = new Pair<>(new ArrayList<String>(), new ArrayList<String>());
|
||||
|
||||
addCommand(new String[]{"help", "commands"}, HelpCommand.class);
|
||||
addCommand("droplimit", DropLimitCommand.class);
|
||||
@@ -217,7 +211,7 @@ public class CommandsExecutor {
|
||||
|
||||
|
||||
private void registerLv1Commands() {
|
||||
levelCommandsCursor = new Pair<>((List<String>) new ArrayList<String>(), (List<String>) new ArrayList<String>());
|
||||
levelCommandsCursor = new Pair<>(new ArrayList<String>(), new ArrayList<String>());
|
||||
|
||||
addCommand("whatdropsfrom", 1, WhatDropsFromCommand.class);
|
||||
addCommand("whodrops", 1, WhoDropsCommand.class);
|
||||
@@ -229,7 +223,7 @@ public class CommandsExecutor {
|
||||
|
||||
|
||||
private void registerLv2Commands(){
|
||||
levelCommandsCursor = new Pair<>((List<String>) new ArrayList<String>(), (List<String>) new ArrayList<String>());
|
||||
levelCommandsCursor = new Pair<>(new ArrayList<String>(), new ArrayList<String>());
|
||||
|
||||
addCommand("recharge", 2, RechargeCommand.class);
|
||||
addCommand("whereami", 2, WhereaMiCommand.class);
|
||||
@@ -272,7 +266,7 @@ public class CommandsExecutor {
|
||||
}
|
||||
|
||||
private void registerLv3Commands() {
|
||||
levelCommandsCursor = new Pair<>((List<String>) new ArrayList<String>(), (List<String>) new ArrayList<String>());
|
||||
levelCommandsCursor = new Pair<>(new ArrayList<String>(), new ArrayList<String>());
|
||||
|
||||
addCommand("debuff", 3, DebuffCommand.class);
|
||||
addCommand("fly", 3, FlyCommand.class);
|
||||
@@ -338,7 +332,7 @@ public class CommandsExecutor {
|
||||
}
|
||||
|
||||
private void registerLv4Commands(){
|
||||
levelCommandsCursor = new Pair<>((List<String>) new ArrayList<String>(), (List<String>) new ArrayList<String>());
|
||||
levelCommandsCursor = new Pair<>(new ArrayList<String>(), new ArrayList<String>());
|
||||
|
||||
addCommand("servermessage", 4, ServerMessageCommand.class);
|
||||
addCommand("proitem", 4, ProItemCommand.class);
|
||||
@@ -369,7 +363,7 @@ public class CommandsExecutor {
|
||||
}
|
||||
|
||||
private void registerLv5Commands(){
|
||||
levelCommandsCursor = new Pair<>((List<String>) new ArrayList<String>(), (List<String>) new ArrayList<String>());
|
||||
levelCommandsCursor = new Pair<>(new ArrayList<String>(), new ArrayList<String>());
|
||||
|
||||
addCommand("debug", 5, DebugCommand.class);
|
||||
addCommand("set", 5, SetCommand.class);
|
||||
@@ -382,7 +376,7 @@ public class CommandsExecutor {
|
||||
}
|
||||
|
||||
private void registerLv6Commands(){
|
||||
levelCommandsCursor = new Pair<>((List<String>) new ArrayList<String>(), (List<String>) new ArrayList<String>());
|
||||
levelCommandsCursor = new Pair<>(new ArrayList<String>(), new ArrayList<String>());
|
||||
|
||||
addCommand("setgmlevel", 6, SetGmLevelCommand.class);
|
||||
addCommand("warpworld", 6, WarpWorldCommand.class);
|
||||
|
||||
@@ -51,10 +51,10 @@ public class ShutdownCommand extends Command {
|
||||
}
|
||||
|
||||
if (time > 1) {
|
||||
int seconds = (int) (time / 1000) % 60;
|
||||
int minutes = (int) ((time / (1000 * 60)) % 60);
|
||||
int hours = (int) ((time / (1000 * 60 * 60)) % 24);
|
||||
int days = (int) ((time / (1000 * 60 * 60 * 24)));
|
||||
int seconds = (time / 1000) % 60;
|
||||
int minutes = (time / (1000 * 60)) % 60;
|
||||
int hours = (time / (1000 * 60 * 60)) % 24;
|
||||
int days = (time / (1000 * 60 * 60 * 24));
|
||||
|
||||
String strTime = "";
|
||||
if (days > 0) strTime += days + " days, ";
|
||||
|
||||
Reference in New Issue
Block a user