spotlessApply

This commit is contained in:
Raven Szewczyk committed 2022-09-22 09:46:01 +01:00
1 parent cde0f9604f
commit 009a807c04
229 files changed
+14083 -14273

No files matched your search

@@ -5,53 +5,49 @@ import mcp.mobius.opis.events.PlayerTracker;
import net.minecraft.command.CommandBase;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.dedicated.DedicatedServer;
import net.minecraft.util.ChatComponentText;
public class CommandEntityCreate extends CommandBase {
@Override
public String getCommandName() {
return "opis_enttrace";
}
@Override
public String getCommandName() {
return "opis_enttrace";
}
@Override
public String getCommandUsage(ICommandSender icommandsender) {
// TODO Auto-generated method stub
return "";
}
@Override
public String getCommandUsage(ICommandSender icommandsender) {
// TODO Auto-generated method stub
return "";
}
@Override
public void processCommand(ICommandSender icommandsender, String[] astring) {
if (astring.length == 1 && astring[0].equals("full")){
OpisServerEventHandler.printEntityFull = true;
OpisServerEventHandler.printEntityTrace = true;
} else {
OpisServerEventHandler.printEntityTrace = !OpisServerEventHandler.printEntityTrace;
OpisServerEventHandler.printEntityFull = false;
}
icommandsender.addChatMessage(new ChatComponentText(String.format("Entity trace is %s", OpisServerEventHandler.printEntityTrace)));
}
@Override
public void processCommand(ICommandSender icommandsender, String[] astring) {
@Override
public int getRequiredPermissionLevel()
{
if (astring.length == 1 && astring[0].equals("full")) {
OpisServerEventHandler.printEntityFull = true;
OpisServerEventHandler.printEntityTrace = true;
} else {
OpisServerEventHandler.printEntityTrace = !OpisServerEventHandler.printEntityTrace;
OpisServerEventHandler.printEntityFull = false;
}
icommandsender.addChatMessage(
new ChatComponentText(String.format("Entity trace is %s", OpisServerEventHandler.printEntityTrace)));
}
@Override
public int getRequiredPermissionLevel() {
return 3;
}
}
@Override
public boolean canCommandSenderUseCommand(ICommandSender sender)
{
if (sender instanceof EntityPlayerMP)
return PlayerTracker.INSTANCE.isPrivileged((EntityPlayerMP)sender);
if (sender instanceof DedicatedServer) return true;
if (!(sender instanceof DedicatedServer) && !(sender instanceof EntityPlayerMP)) return true;
@Override
public boolean canCommandSenderUseCommand(ICommandSender sender) {
if (sender instanceof EntityPlayerMP) return PlayerTracker.INSTANCE.isPrivileged((EntityPlayerMP) sender);
return false;
}
if (sender instanceof DedicatedServer) return true;
if (!(sender instanceof DedicatedServer) && !(sender instanceof EntityPlayerMP)) return true;
return false;
}
}