Skip to content
This repository was archived by the owner on Jun 7, 2022. It is now read-only.

Commit 68b619e

Browse files
McRubenGiantTreeLP
authored andcommitted
Added debug command and some debugs, especially in the login section for the "Unverified Login" bug
1 parent a7d54e1 commit 68b619e

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
* Copyright (c) Tarek Hosni El Alaoui 2017
3+
*/
4+
5+
package de.dytanic.cloudnetcore.command;
6+
7+
import de.dytanic.cloudnet.command.Command;
8+
import de.dytanic.cloudnet.command.CommandSender;
9+
import de.dytanic.cloudnetcore.CloudNet;
10+
11+
import java.io.IOException;
12+
13+
public final class CommandDebug extends Command {
14+
15+
public CommandDebug()
16+
{
17+
super("debug", "cloudnet.command.debug");
18+
19+
description = "Toggles the cloudnet debug mode";
20+
21+
}
22+
23+
@Override
24+
public void onExecuteCommand(CommandSender sender, String[] args)
25+
{
26+
CloudNet.getLogger().setDebugging(!CloudNet.getLogger().isDebugging());
27+
if (CloudNet.getLogger().isDebugging()) {
28+
sender.sendMessage("debugging was enabled");
29+
} else {
30+
sender.sendMessage("debugging was disabled");
31+
}
32+
}
33+
}

0 commit comments

Comments
 (0)