Split up and reorganise WizardryUtilities

This commit is contained in:
Electroblob77
2020-06-13 23:29:01 +01:00
parent 57e96458d5
commit 238b9d04bb
189 changed files with 1724 additions and 1731 deletions
@@ -2,7 +2,7 @@ package electroblob.wizardry.command;
import electroblob.wizardry.Wizardry;
import electroblob.wizardry.data.WizardData;
import electroblob.wizardry.util.WizardryUtilities;
import electroblob.wizardry.util.EntityUtils;
import net.minecraft.command.*;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
@@ -78,7 +78,7 @@ public class CommandSetAlly extends CommandBase {
// Don't want to catch the exception here either, because there can be no other second argument.
if(allyOf != sender && sender instanceof EntityPlayer
&& !WizardryUtilities.isPlayerOp((EntityPlayer)sender, server)){
&& !EntityUtils.isPlayerOp((EntityPlayer)sender, server)){
// Displays a chat message if a non-op tries to modify another player's allies.
if(server.sendCommandFeedback()){
TextComponentTranslation TextComponentTranslation2 = new TextComponentTranslation(
@@ -2,7 +2,7 @@ package electroblob.wizardry.command;
import electroblob.wizardry.Wizardry;
import electroblob.wizardry.data.WizardData;
import electroblob.wizardry.util.WizardryUtilities;
import electroblob.wizardry.util.EntityUtils;
import net.minecraft.command.CommandBase;
import net.minecraft.command.CommandException;
import net.minecraft.command.ICommandSender;
@@ -72,7 +72,7 @@ public class CommandViewAllies extends CommandBase {
// Don't want to catch the exception here either, because there can be no other first argument.
if(player != sender && sender instanceof EntityPlayer
&& !WizardryUtilities.isPlayerOp((EntityPlayer)sender, server)){
&& !EntityUtils.isPlayerOp((EntityPlayer)sender, server)){
// Displays a chat message if a non-op tries to view another player's allies.
if(server.sendCommandFeedback()){
TextComponentTranslation TextComponentTranslation2 = new TextComponentTranslation(