I'm tired of seeing prs that make small code reformats so im doing a commit to fix it all at once

This commit is contained in:
ZeroEpoch1969
2018-07-30 23:41:56 -07:00
parent 8bd8efc665
commit 60c627c591
46 changed files with 457 additions and 273 deletions

View File

@ -28,7 +28,7 @@ public class MobBlocker extends FreedomService
protected void onStop()
{
}
//fixes crash mobs, credit to Mafrans
@EventHandler(priority = EventPriority.NORMAL)
public void onEntitySpawn(EntitySpawnEvent e)

View File

@ -36,7 +36,7 @@ public class PVPBlocker extends FreedomService
Player target = null;
if (event.getEntity() instanceof Player)
{
target = (Player)event.getEntity();
target = (Player) event.getEntity();
if (event.getDamager() instanceof Player)
{
player = (Player) event.getDamager();
@ -59,7 +59,7 @@ public class PVPBlocker extends FreedomService
}
}
if (player != null &! plugin.al.isAdmin(player))
if (player != null & !plugin.al.isAdmin(player))
{
if (player.getGameMode() == GameMode.CREATIVE)
{

View File

@ -43,7 +43,7 @@ public class PotionBlocker extends FreedomService
Player player = null;
if (projectileSource instanceof Player)
{
player = (Player)projectileSource;
player = (Player) projectileSource;
}
if (isDeathPotion(potion.getEffects()))
@ -64,7 +64,7 @@ public class PotionBlocker extends FreedomService
Player player = null;
if (projectileSource instanceof Player)
{
player = (Player)projectileSource;
player = (Player) projectileSource;
}
if (isDeathPotion(potion.getEffects()))

View File

@ -20,12 +20,12 @@ public class CommandBlockerEntry
private final String subCommand;
@Getter
private final String message;
public CommandBlockerEntry(CommandBlockerRank rank, CommandBlockerAction action, String command, String message)
{
this(rank, action, command, null, message);
}
public CommandBlockerEntry(CommandBlockerRank rank, CommandBlockerAction action, String command, String subCommand, String message)
{
this.rank = rank;
@ -34,12 +34,12 @@ public class CommandBlockerEntry
this.subCommand = ((subCommand == null) ? null : subCommand.toLowerCase().trim());
this.message = ((message == null || message.equals("_")) ? "That command is blocked." : message);
}
public void doActions(CommandSender sender)
{
if (action == CommandBlockerAction.BLOCK_AND_EJECT && sender instanceof Player)
{
TotalFreedomMod.plugin().ae.autoEject((Player)sender, "You used a prohibited command: " + command);
TotalFreedomMod.plugin().ae.autoEject((Player) sender, "You used a prohibited command: " + command);
FUtil.bcastMsg(sender.getName() + " was automatically kicked for using harmful commands.", ChatColor.RED);
return;
}
@ -50,27 +50,27 @@ public class CommandBlockerEntry
}
FUtil.playerMsg(sender, FUtil.colorize(message));
}
public CommandBlockerRank getRank()
{
return rank;
}
public CommandBlockerAction getAction()
{
return action;
}
public String getCommand()
{
return command;
}
public String getSubCommand()
{
return subCommand;
}
public String getMessage()
{
return message;