blob: d5da1c7ffcd9e482aad2bb009c0e33d5387a49ea (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
package kr.syeyoung.dungeonsguide.commands;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import kr.syeyoung.dungeonsguide.utils.SkyblockUtils;
import net.minecraft.command.CommandBase;
import net.minecraft.command.ICommandSender;
import net.minecraft.util.ChatComponentText;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class CommandWhatYearIsIt extends CommandBase {
@Override
public String getCommandName() {
return "tellmeyear";
}
@Override
public String getCommandUsage(ICommandSender sender) {
return "tellmeyear";
}
@Override
public void processCommand(ICommandSender sender, String[] args) {
try {
sender.addChatMessage(new ChatComponentText("Current year is "+ SkyblockUtils.getSkyblockYear()));
} catch (Throwable throwable) {
throwable.printStackTrace();
}
}
@Override
public int getRequiredPermissionLevel() {
return 0;
}
}
|