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

@ -10,7 +10,7 @@ import org.bukkit.entity.Entity;
import org.bukkit.entity.AreaEffectCloud;
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
@CommandParameters(description = "Clears lingering potion area effect clouds.", usage = "/<command>", aliases="aec")
@CommandParameters(description = "Clears lingering potion area effect clouds.", usage = "/<command>", aliases = "aec")
public class Command_aeclear extends FreedomCommand
{

View File

@ -15,7 +15,7 @@ import org.bukkit.entity.Player;
@CommandParameters(description = "Place a cage around someone.", usage = "/<command> <purge | off | <partialname> [skull | block] [blockname | playername]")
public class Command_cage extends FreedomCommand
{
public boolean run(final CommandSender sender, final Player playerSender, final Command cmd, final String commandLabel, final String[] args, final boolean senderIsConsole)
{
if (args.length == 0)

View File

@ -17,7 +17,8 @@ import java.util.List;
@CommandParameters(description = "Lists the real names of all online players.", usage = "/<command> [-a | -i | -f | -v]", aliases = "who")
public class Command_list extends FreedomCommand
{
public boolean run(final CommandSender sender, final Player playerSender, final Command cmd, final String commandLabel, final String[] args, final boolean senderIsConsole) {
public boolean run(final CommandSender sender, final Player playerSender, final Command cmd, final String commandLabel, final String[] args, final boolean senderIsConsole)
{
if (args.length > 1)
{
return false;
@ -152,13 +153,13 @@ public class Command_list extends FreedomCommand
return color + prefix;
}
private enum ListFilter
{
PLAYERS,
ADMINS,
VANISHED_ADMINS,
FAMOUS_PLAYERS,
PLAYERS,
ADMINS,
VANISHED_ADMINS,
FAMOUS_PLAYERS,
IMPOSTORS
}
}

View File

@ -46,9 +46,9 @@ public class Command_onlinemode extends FreedomCommand
try
{
plugin.si.setOnlineMode(onlineMode);
plugin.si.setOnlineMode(onlineMode);
if (onlineMode)
if (onlineMode)
{
for (Player player : server.getOnlinePlayers())
{

View File

@ -160,9 +160,9 @@ public class Command_potion extends FreedomCommand
target.addPotionEffect(new_effect, true);
msg(
"Added potion effect: " + new_effect.getType().getName()
+ ", Duration: " + new_effect.getDuration()
+ ", Amplifier: " + new_effect.getAmplifier()
+ (!target.equals(playerSender) ? " to player " + target.getName() + "." : " to yourself."), ChatColor.AQUA);
+ ", Duration: " + new_effect.getDuration()
+ ", Amplifier: " + new_effect.getAmplifier()
+ (!target.equals(playerSender) ? " to player " + target.getName() + "." : " to yourself."), ChatColor.AQUA);
return true;
}

View File

@ -48,7 +48,7 @@ public class Command_premium extends FreedomCommand
final URLConnection urlConnection = getUrl.openConnection();
final String message;
try ( // Read the response
BufferedReader in = new BufferedReader(new InputStreamReader(urlConnection.getInputStream())))
BufferedReader in = new BufferedReader(new InputStreamReader(urlConnection.getInputStream())))
{
message = (!"PREMIUM".equalsIgnoreCase(in.readLine()) ? ChatColor.RED + "No" : ChatColor.DARK_GREEN + "Yes");
}

View File

@ -29,7 +29,7 @@ public class Command_rainbownick extends FreedomCommand
msg("That nickname contains invalid characters.");
return true;
}
if (nickPlain.length() < 4 || nickPlain.length() > 30)
{
msg("Your nickname must be between 4 and 30 characters long.");
@ -48,9 +48,9 @@ public class Command_rainbownick extends FreedomCommand
return true;
}
}
final String newNick = FUtil.rainbowify(ChatColor.stripColor(FUtil.colorize(nickPlain)));
plugin.esb.setNickname(sender.getName(), newNick);
msg("Your nickname is now: " + newNick);

View File

@ -17,7 +17,7 @@ import java.util.List;
import java.util.Set;
@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME)
@CommandParameters(description = "Spawn an entity.", usage = "/<command> <entitytype> [amount]", aliases="spawnentity")
@CommandParameters(description = "Spawn an entity.", usage = "/<command> <entitytype> [amount]", aliases = "spawnentity")
public class Command_spawnmob extends FreedomCommand
{

View File

@ -8,7 +8,7 @@ import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.ONLY_IN_GAME)
@CommandParameters(description = "Quickly spectate someone.", usage = "/<command> <playername>", aliases="spec")
@CommandParameters(description = "Quickly spectate someone.", usage = "/<command> <playername>", aliases = "spec")
public class Command_spectate extends FreedomCommand
{

View File

@ -14,6 +14,7 @@ import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.Arrays;
import java.util.List;
import static me.totalfreedom.totalfreedommod.util.FUtil.DEVELOPERS:
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
@CommandParameters(description = "Sets yourself a prefix", usage = "/<command> [-s[ave]] <set <tag..> | off | clear <player> | clearall>")

View File

@ -15,11 +15,11 @@ import org.bukkit.entity.Player;
@CommandParameters(description = "Gives you a tag with random colors", usage = "/<command> <tag>", aliases = "tn")
public class Command_tagnyan extends FreedomCommand
{
public static final List<String> FORBIDDEN_WORDS = Arrays.asList(new String[]
{
"admin", "owner", "moderator", "developer", "console", "SRA", "TCA", "SA"
});
{
"admin", "owner", "moderator", "developer", "console", "SRA", "TCA", "SA"
});
@Override
public boolean run(CommandSender sender, Player playerSender, Command cmd, String commandLabel, String[] args, boolean senderIsConsole)

View File

@ -55,7 +55,7 @@ public class Command_toggle extends FreedomCommand
{
toggle("Lava placement is", ConfigEntry.ALLOW_LAVA_PLACE);
return true;
}
}
else if (args[0].equalsIgnoreCase("fluidspread"))
{
toggle("Fluid spread is", ConfigEntry.ALLOW_FLUID_SPREAD);
@ -155,7 +155,7 @@ public class Command_toggle extends FreedomCommand
return false;
}
}
private void toggle(final String name, final ConfigEntry entry)
{
msg(name + " now " + (entry.setBoolean(!entry.getBoolean()) ? "enabled." : "disabled."));

View File

@ -20,7 +20,8 @@ public class Command_vanish extends FreedomCommand
{
public static ArrayList<Player> VANISHED = new ArrayList<>();
public boolean run(final CommandSender sender, final Player playerSender, final Command cmd, final String commandLabel, final String[] args, final boolean senderIsConsole) {
public boolean run(final CommandSender sender, final Player playerSender, final Command cmd, final String commandLabel, final String[] args, final boolean senderIsConsole)
{
Displayable display = plugin.rm.getDisplay(playerSender);
String loginMsg = display.getColoredLoginMessage();
String displayName = display.getColor() + playerSender.getName();