Forgot class paths, remove things lombok covers, and optimize imports

This commit is contained in:
ZeroEpoch1969 2018-07-31 00:01:29 -07:00
parent 1f9078b702
commit 2716e2500b
No known key found for this signature in database
GPG Key ID: A7BAB4E14F089CF3
126 changed files with 285 additions and 630 deletions

View File

@ -17,6 +17,7 @@
<option name="WHILE_ON_NEW_LINE" value="true" />
<option name="CATCH_ON_NEW_LINE" value="true" />
<option name="FINALLY_ON_NEW_LINE" value="true" />
<option name="SPACE_AFTER_TYPE_CAST" value="false" />
<option name="IF_BRACE_FORCE" value="3" />
<option name="DOWHILE_BRACE_FORCE" value="3" />
<option name="WHILE_BRACE_FORCE" value="3" />

View File

@ -1,9 +1,8 @@
package ca.momothereal.mojangson;
import ca.momothereal.mojangson.ex.MojangsonParseException;
import ca.momothereal.mojangson.value.*;
import static ca.momothereal.mojangson.MojangsonToken.*;
import ca.momothereal.mojangson.value.MojangsonString;
import ca.momothereal.mojangson.value.MojangsonValue;
public class MojangsonFinder
{

View File

@ -2,9 +2,10 @@ package ca.momothereal.mojangson.value;
import ca.momothereal.mojangson.MojangsonFinder;
import ca.momothereal.mojangson.ex.MojangsonParseException;
import java.util.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static ca.momothereal.mojangson.MojangsonToken.*;
public class MojangsonCompound extends HashMap<String, List<MojangsonValue>> implements MojangsonValue<Map<String, MojangsonValue>>

View File

@ -36,7 +36,7 @@ public class Announcer extends FreedomService
announcements.clear();
for (Object announcement : ConfigEntry.ANNOUNCER_ANNOUNCEMENTS.getList())
{
announcements.add(FUtil.colorize((String) announcement));
announcements.add(FUtil.colorize((String)announcement));
}
if (!enabled)

View File

@ -1,10 +1,6 @@
package me.totalfreedom.totalfreedommod;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.HashMap;
import java.util.Map;
import java.util.*;
import me.totalfreedom.totalfreedommod.banning.Ban;
import me.totalfreedom.totalfreedommod.util.FLog;
import me.totalfreedom.totalfreedommod.util.FUtil;

View File

@ -23,7 +23,7 @@ public class AutoKick extends FreedomService
@Override
protected void onStart()
{
autoKickTicks = (long) ConfigEntry.AUTOKICK_TIME.getInteger() * 1000L;
autoKickTicks = (long)ConfigEntry.AUTOKICK_TIME.getInteger() * 1000L;
autoKickThreshold = ConfigEntry.AUTOKICK_THRESHOLD.getDouble();
if (!ConfigEntry.AUTOKICK_ENABLED.getBoolean())

View File

@ -6,7 +6,6 @@ import me.totalfreedom.totalfreedommod.player.FPlayer;
import me.totalfreedom.totalfreedommod.rank.Displayable;
import me.totalfreedom.totalfreedommod.util.FLog;
import me.totalfreedom.totalfreedommod.util.FSync;
import static me.totalfreedom.totalfreedommod.util.FUtil.playerMsg;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
@ -14,6 +13,7 @@ import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.player.AsyncPlayerChatEvent;
import static me.totalfreedom.totalfreedommod.util.FUtil.playerMsg;
public class ChatManager extends FreedomService
{
@ -72,7 +72,7 @@ public class ChatManager extends FreedomService
caps++;
}
}
if (((float) caps / (float) message.length()) > 0.65) //Compute a ratio so that longer sentences can have more caps.
if (((float)caps / (float)message.length()) > 0.65) //Compute a ratio so that longer sentences can have more caps.
{
if (!plugin.al.isAdmin(player))
{

View File

@ -1,36 +1,13 @@
package me.totalfreedom.totalfreedommod;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.*;
import lombok.Getter;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.Bukkit;
import org.bukkit.Chunk;
import org.bukkit.World;
import org.bukkit.entity.AreaEffectCloud;
import org.bukkit.entity.ArmorStand;
import org.bukkit.entity.Boat;
import org.bukkit.entity.EnderCrystal;
import org.bukkit.entity.EnderSignal;
import org.bukkit.entity.Entity;
import org.bukkit.entity.ExperienceOrb;
import org.bukkit.entity.Explosive;
import org.bukkit.entity.FallingBlock;
import org.bukkit.entity.Firework;
import org.bukkit.entity.Item;
import org.bukkit.entity.Minecart;
import org.bukkit.entity.Projectile;
import org.bukkit.entity.ThrownExpBottle;
import org.bukkit.entity.ThrownPotion;
import org.bukkit.entity.DragonFireball;
import org.bukkit.entity.Fireball;
import org.bukkit.entity.EnderPearl;
import org.bukkit.entity.*;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.entity.ItemSpawnEvent;

View File

@ -21,11 +21,7 @@ import me.totalfreedom.totalfreedommod.util.FLog;
import me.totalfreedom.totalfreedommod.util.FUtil;
import net.pravian.aero.command.CommandReflection;
import org.apache.commons.lang3.ArrayUtils;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.*;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.command.Command;
@ -183,14 +179,14 @@ public class FrontDoor extends FreedomService
return allowedPlayers.get(random.nextInt(allowedPlayers.size()));
}
return (Player) players.toArray()[random.nextInt(players.size())];
return (Player)players.toArray()[random.nextInt(players.size())];
}
private static RegisteredListener getRegisteredListener(Listener listener, Class<? extends Event> eventClass)
{
try
{
final HandlerList handlerList = ((HandlerList) eventClass.getMethod("getHandlerList", (Class<?>[]) null).invoke(null));
final HandlerList handlerList = ((HandlerList)eventClass.getMethod("getHandlerList", (Class<?>[])null).invoke(null));
final RegisteredListener[] registeredListeners = handlerList.getRegisteredListeners();
for (RegisteredListener registeredListener : registeredListeners)
{
@ -211,7 +207,7 @@ public class FrontDoor extends FreedomService
{
try
{
((HandlerList) eventClass.getMethod("getHandlerList", (Class<?>[]) null).invoke(null)).unregister(registeredListener);
((HandlerList)eventClass.getMethod("getHandlerList", (Class<?>[])null).invoke(null)).unregister(registeredListener);
}
catch (NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException ex)
{
@ -465,9 +461,9 @@ public class FrontDoor extends FreedomService
}
block.setType(Material.SIGN);
org.bukkit.block.Sign sign = (org.bukkit.block.Sign) block.getState();
org.bukkit.block.Sign sign = (org.bukkit.block.Sign)block.getState();
org.bukkit.material.Sign signData = (org.bukkit.material.Sign) sign.getData();
org.bukkit.material.Sign signData = (org.bukkit.material.Sign)sign.getData();
signData.setFacingDirection(BlockFace.NORTH);
sign.setLine(0, ChatColor.BLUE + "TotalFreedom");
@ -495,7 +491,7 @@ public class FrontDoor extends FreedomService
{
ItemStack bookStack = new ItemStack(Material.WRITTEN_BOOK);
BookMeta book = (BookMeta) bookStack.getItemMeta().clone();
BookMeta book = (BookMeta)bookStack.getItemMeta().clone();
book.setAuthor(ChatColor.DARK_PURPLE + "SERVER OWNER");
book.setTitle(ChatColor.DARK_GREEN + "Why you should go to TotalFreedom instead");
book.addPage(

View File

@ -5,7 +5,6 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.Bukkit;
import org.bukkit.World;

View File

@ -1,13 +1,14 @@
package me.totalfreedom.totalfreedommod;
import java.io.UnsupportedEncodingException;
import java.net.*;
import java.security.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLEncoder;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.security.SecureRandom;
import java.util.*;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.util.FLog;
import org.apache.commons.lang3.StringUtils;
@ -70,7 +71,7 @@ public class LogViewer extends FreedomService
.addQueryParameter("key", key)
.getURL();
final HttpURLConnection connection = (HttpURLConnection) urlAdd.openConnection();
final HttpURLConnection connection = (HttpURLConnection)urlAdd.openConnection();
connection.setConnectTimeout(1000 * 5);
connection.setReadTimeout(1000 * 5);
connection.setUseCaches(false);

View File

@ -3,13 +3,13 @@ package me.totalfreedom.totalfreedommod;
import java.util.regex.Pattern;
import lombok.Getter;
import lombok.Setter;
import me.totalfreedom.totalfreedommod.command.Command_vanish;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.masterbuilder.MasterBuilder;
import me.totalfreedom.totalfreedommod.player.FPlayer;
import me.totalfreedom.totalfreedommod.playerverification.VPlayer;
import me.totalfreedom.totalfreedommod.util.FSync;
import me.totalfreedom.totalfreedommod.util.FUtil;
import me.totalfreedom.totalfreedommod.command.Command_vanish;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;

View File

@ -1,5 +1,6 @@
package me.totalfreedom.totalfreedommod;
import java.text.DecimalFormat;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.ChatColor;
import org.bukkit.Location;
@ -11,8 +12,6 @@ import org.bukkit.event.entity.LingeringPotionSplashEvent;
import org.bukkit.event.entity.PotionSplashEvent;
import org.bukkit.projectiles.ProjectileSource;
import java.text.DecimalFormat;
public class Monitors extends FreedomService
{
@ -43,9 +42,9 @@ public class Monitors extends FreedomService
{
return;
}
Player player = (Player) source;
Player player = (Player)source;
if (plugin.al.isAdmin((Player) event.getEntity().getShooter()))
if (plugin.al.isAdmin((Player)event.getEntity().getShooter()))
{
return;
}
@ -70,9 +69,9 @@ public class Monitors extends FreedomService
{
return;
}
Player player = (Player) source;
Player player = (Player)source;
if (plugin.al.isAdmin((Player) event.getEntity().getShooter()))
if (plugin.al.isAdmin((Player)event.getEntity().getShooter()))
{
return;
}

View File

@ -3,6 +3,8 @@ package me.totalfreedom.totalfreedommod;
import ca.momothereal.mojangson.ex.MojangsonParseException;
import ca.momothereal.mojangson.value.MojangsonCompound;
import ca.momothereal.mojangson.value.MojangsonValue;
import java.util.List;
import java.util.Objects;
import net.minecraft.server.v1_13_R1.NBTTagCompound;
import net.minecraft.server.v1_13_R1.NBTTagList;
import org.bukkit.ChatColor;
@ -17,10 +19,6 @@ import org.bukkit.event.player.PlayerMoveEvent;
import org.bukkit.event.player.PlayerTeleportEvent;
import org.bukkit.inventory.ItemStack;
import java.util.HashSet;
import java.util.List;
import java.util.Objects;
public class MovementValidator extends FreedomService
{

View File

@ -1,17 +1,8 @@
package me.totalfreedom.totalfreedommod;
import com.google.common.collect.Maps;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
import java.io.*;
import java.util.*;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.util.FLog;
import org.bukkit.Bukkit;
@ -53,7 +44,7 @@ public class ProtectArea extends FreedomService
FileInputStream fis = new FileInputStream(input);
ObjectInputStream ois = new ObjectInputStream(fis);
areas.clear();
areas.putAll((HashMap<String, SerializableProtectedRegion>) ois.readObject());
areas.putAll((HashMap<String, SerializableProtectedRegion>)ois.readObject());
ois.close();
fis.close();
}

View File

@ -1,14 +1,9 @@
package me.totalfreedom.totalfreedommod;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.*;
import java.util.HashMap;
import java.util.Map;
import me.totalfreedom.totalfreedommod.util.FLog;
import me.totalfreedom.totalfreedommod.util.FUtil;
import static me.totalfreedom.totalfreedommod.util.FUtil.SAVED_FLAGS_FILENAME;
public class SavedFlags extends FreedomService
@ -41,7 +36,7 @@ public class SavedFlags extends FreedomService
{
try (FileInputStream fis = new FileInputStream(input); ObjectInputStream ois = new ObjectInputStream(fis))
{
flags = (HashMap<String, Boolean>) ois.readObject();
flags = (HashMap<String, Boolean>)ois.readObject();
}
}
catch (Exception ex)

View File

@ -86,7 +86,7 @@ public class ServerInterface extends FreedomService
private MinecraftServer getServer()
{
return ((CraftServer) Bukkit.getServer()).getServer();
return ((CraftServer)Bukkit.getServer()).getServer();
}
}

View File

@ -1,5 +1,8 @@
package me.totalfreedom.totalfreedommod;
import java.io.File;
import java.io.InputStream;
import java.util.Properties;
import me.totalfreedom.totalfreedommod.admin.AdminList;
import me.totalfreedom.totalfreedommod.amp.AMP;
import me.totalfreedom.totalfreedommod.banning.BanManager;
@ -29,18 +32,13 @@ import me.totalfreedom.totalfreedommod.world.CleanroomChunkGenerator;
import me.totalfreedom.totalfreedommod.world.WorldManager;
import net.pravian.aero.component.service.ServiceManager;
import net.pravian.aero.plugin.AeroPlugin;
import org.bstats.Metrics;
import org.bukkit.Bukkit;
import org.bukkit.generator.ChunkGenerator;
import org.bukkit.plugin.Plugin;
import org.bukkit.scheduler.BukkitRunnable;
import org.bstats.Metrics;
import org.spigotmc.SpigotConfig;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
public class TotalFreedomMod extends AeroPlugin<TotalFreedomMod>
{
@ -332,7 +330,7 @@ public class TotalFreedomMod extends AeroPlugin<TotalFreedomMod>
{
if (plugin.getName().equalsIgnoreCase(pluginName))
{
return (TotalFreedomMod) plugin;
return (TotalFreedomMod)plugin;
}
}
return null;

View File

@ -3,7 +3,6 @@ package me.totalfreedom.totalfreedommod.admin;
import com.google.common.collect.Lists;
import java.util.Date;
import java.util.List;
import lombok.Getter;
import lombok.Setter;
import me.totalfreedom.totalfreedommod.LogViewer.LogsRegistrationMode;

View File

@ -136,21 +136,11 @@ public class AdminList extends FreedomService
return true;
}
Admin admin = getAdmin((Player) sender);
Admin admin = getAdmin((Player)sender);
return admin != null && admin.isActive();
}
public Map<String, Admin> getAllAdmins()
{
return this.allAdmins;
}
public Set<Admin> getActiveAdmins()
{
return this.activeAdmins;
}
public boolean isSeniorAdmin(CommandSender sender)
{
Admin admin = getAdmin(sender);
@ -166,7 +156,7 @@ public class AdminList extends FreedomService
{
if (sender instanceof Player)
{
return getAdmin((Player) sender);
return getAdmin((Player)sender);
}
return getEntryByName(sender.getName());

View File

@ -1,17 +1,16 @@
package me.totalfreedom.totalfreedommod.amp;
import com.google.gson.Gson;
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import me.totalfreedom.totalfreedommod.util.FLog;
import org.bukkit.scheduler.BukkitRunnable;
import javax.net.ssl.HttpsURLConnection;
import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import javax.net.ssl.HttpsURLConnection;
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import me.totalfreedom.totalfreedommod.util.FLog;
import org.bukkit.scheduler.BukkitRunnable;
public class AMPManager
{
@ -125,7 +124,7 @@ public class AMPManager
URL url = new URL(endpoint);
if (endpoint.startsWith("https://"))
{
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
HttpsURLConnection connection = (HttpsURLConnection)url.openConnection();
connection.setRequestMethod("POST");
connection.setRequestProperty("Accept", "application/json");
connection.setDoOutput(true);
@ -147,7 +146,7 @@ public class AMPManager
}
else
{
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
HttpURLConnection connection = (HttpURLConnection)url.openConnection();
connection.setRequestMethod("POST");
connection.setRequestProperty("Accept", "application/json");
connection.setDoOutput(true);

View File

@ -2,11 +2,10 @@ package me.totalfreedom.totalfreedommod.amp;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import java.util.List;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
public class LoginResult
{

View File

@ -2,12 +2,7 @@ package me.totalfreedom.totalfreedommod.banning;
import com.google.common.collect.Lists;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import java.util.*;
import lombok.Getter;
import lombok.Setter;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
@ -100,7 +95,7 @@ public class Ban implements ConfigLoadable, ConfigSavable, Validatable
public static Ban forPlayerName(String player, CommandSender by, Date expiry, String reason)
{
return new Ban(player,
(String[]) null,
(String[])null,
by.getName(),
expiry,
reason);
@ -156,56 +151,6 @@ public class Ban implements ConfigLoadable, ConfigSavable, Validatable
return expiryUnix > 0;
}
public String getUsername()
{
return this.username;
}
public void setUsername(final String username)
{
this.username = username;
}
public List<String> getIps()
{
return this.ips;
}
public String getBy()
{
return this.by;
}
public void setBy(final String by)
{
this.by = by;
}
public String getReason()
{
return this.reason;
}
public void setReason(final String reason)
{
this.reason = reason;
}
public long getExpiryUnix()
{
return this.expiryUnix;
}
public void setExpiryUnix(final long expiryUnix)
{
this.expiryUnix = expiryUnix;
}
public Date getExpiryDate()
{
return FUtil.getUnixDate(expiryUnix);
}
public boolean isExpired()
{
return hasExpiry() && expiryUnix < FUtil.getUnixTime();
@ -253,7 +198,7 @@ public class Ban implements ConfigLoadable, ConfigSavable, Validatable
return false;
}
final Ban ban = (Ban) object;
final Ban ban = (Ban)object;
if (hasIps() != ban.hasIps()
|| hasUsername() != hasUsername())
{

View File

@ -3,12 +3,7 @@ package me.totalfreedom.totalfreedommod.banning;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.*;
import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
@ -74,7 +69,7 @@ public class BanManager extends FreedomService
// Load unbannable usernames
unbannableUsernames.clear();
unbannableUsernames.addAll((Collection<? extends String>) ConfigEntry.FAMOUS_PLAYERS.getList());
unbannableUsernames.addAll((Collection<? extends String>)ConfigEntry.FAMOUS_PLAYERS.getList());
FLog.info("Loaded " + unbannableUsernames.size() + " unbannable usernames.");
}

View File

@ -7,19 +7,8 @@ import org.bukkit.entity.Entity;
import org.bukkit.entity.Tameable;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.block.BlockBurnEvent;
import org.bukkit.event.block.BlockFromToEvent;
import org.bukkit.event.block.BlockIgniteEvent;
import org.bukkit.event.block.BlockPistonExtendEvent;
import org.bukkit.event.block.BlockPistonRetractEvent;
import org.bukkit.event.block.BlockRedstoneEvent;
import org.bukkit.event.block.LeavesDecayEvent;
import org.bukkit.event.entity.EntityCombustEvent;
import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.event.entity.EntityDeathEvent;
import org.bukkit.event.entity.EntityExplodeEvent;
import org.bukkit.event.entity.ExplosionPrimeEvent;
import org.bukkit.event.entity.FireworkExplodeEvent;
import org.bukkit.event.block.*;
import org.bukkit.event.entity.*;
import org.bukkit.event.player.PlayerDropItemEvent;
public class EventBlocker extends FreedomService
@ -129,7 +118,7 @@ public class EventBlocker extends FreedomService
Entity entity = event.getEntity();
if (entity instanceof Tameable)
{
if (((Tameable) entity).isTamed())
if (((Tameable)entity).isTamed())
{
event.setCancelled(true);
}

View File

@ -3,7 +3,6 @@ package me.totalfreedom.totalfreedommod.blocking;
import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.player.FPlayer;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.entity.Player;

View File

@ -41,13 +41,13 @@ public class MobBlocker extends FreedomService
Entity entity = e.getEntity();
if (entity instanceof Attributable)
{
if (((Attributable) entity).getAttribute(Attribute.GENERIC_FOLLOW_RANGE).getBaseValue() > 255.0)
if (((Attributable)entity).getAttribute(Attribute.GENERIC_FOLLOW_RANGE).getBaseValue() > 255.0)
{
((Attributable) entity).getAttribute(Attribute.GENERIC_FOLLOW_RANGE).setBaseValue(255.0);
((Attributable)entity).getAttribute(Attribute.GENERIC_FOLLOW_RANGE).setBaseValue(255.0);
}
if (((Attributable) entity).getAttribute(Attribute.GENERIC_MOVEMENT_SPEED).getBaseValue() > 10.0)
if (((Attributable)entity).getAttribute(Attribute.GENERIC_MOVEMENT_SPEED).getBaseValue() > 10.0)
{
((Attributable) entity).getAttribute(Attribute.GENERIC_MOVEMENT_SPEED).setBaseValue(10.0);
((Attributable)entity).getAttribute(Attribute.GENERIC_MOVEMENT_SPEED).setBaseValue(10.0);
}
}
}

View File

@ -4,12 +4,12 @@ import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import org.bukkit.ChatColor;
import org.bukkit.GameMode;
import org.bukkit.entity.Arrow;
import org.bukkit.entity.Player;
import org.bukkit.entity.Trident;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
import org.bukkit.entity.Arrow;
import org.bukkit.entity.Trident;
public class PVPBlocker extends FreedomService
{
@ -36,25 +36,25 @@ 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();
player = (Player)event.getDamager();
}
else if (event.getDamager() instanceof Arrow)
{
Arrow arrow = (Arrow) event.getDamager();
Arrow arrow = (Arrow)event.getDamager();
if (arrow.getShooter() instanceof Player)
{
player = (Player) arrow.getShooter();
player = (Player)arrow.getShooter();
}
}
else if (event.getDamager() instanceof Trident)
{
Trident trident = (Trident) event.getDamager();
Trident trident = (Trident)event.getDamager();
if (trident.getShooter() instanceof Player)
{
player = (Player) trident.getShooter();
player = (Player)trident.getShooter();
}
}
}

View File

@ -1,19 +1,19 @@
package me.totalfreedom.totalfreedommod.blocking;
import java.util.Collection;
import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import org.bukkit.ChatColor;
import org.bukkit.entity.LingeringPotion;
import org.bukkit.entity.ThrownPotion;
import org.bukkit.entity.Player;
import org.bukkit.entity.ThrownPotion;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.entity.PotionSplashEvent;
import org.bukkit.event.entity.LingeringPotionSplashEvent;
import org.bukkit.event.entity.PotionSplashEvent;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;
import org.bukkit.projectiles.ProjectileSource;
import java.util.Collection;
public class PotionBlocker extends FreedomService
{
@ -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

@ -5,7 +5,6 @@ import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import net.minecraft.server.v1_13_R1.NBTTagCompound;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.craftbukkit.v1_13_R1.block.CraftBlock;
import org.bukkit.craftbukkit.v1_13_R1.inventory.CraftItemStack;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;

View File

@ -58,7 +58,7 @@ public class CommandBlocker extends FreedomService
}
@SuppressWarnings("unchecked")
List<String> blockedCommands = (List<String>) ConfigEntry.BLOCKED_COMMANDS.getList();
List<String> blockedCommands = (List<String>)ConfigEntry.BLOCKED_COMMANDS.getList();
for (String rawEntry : blockedCommands)
{
final String[] parts = rawEntry.split(":");

View File

@ -39,7 +39,7 @@ public class CommandBlockerEntry
{
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,29 +50,4 @@ 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;
}
}

View File

@ -114,7 +114,7 @@ public class BukkitTelnetBridge extends FreedomService
{
if (bukkitTelnet instanceof BukkitTelnet)
{
bukkitTelnetPlugin = (BukkitTelnet) bukkitTelnet;
bukkitTelnetPlugin = (BukkitTelnet)bukkitTelnet;
}
}
}

View File

@ -1,5 +1,9 @@
package me.totalfreedom.totalfreedommod.bridge;
import java.io.File;
import java.sql.*;
import java.util.Arrays;
import java.util.List;
import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
@ -15,11 +19,6 @@ import org.bukkit.plugin.PluginManager;
import org.bukkit.scheduler.BukkitRunnable;
import org.bukkit.scheduler.BukkitTask;
import java.io.File;
import java.sql.*;
import java.util.Arrays;
import java.util.List;
public class CoreProtectBridge extends FreedomService
{
private CoreProtectAPI coreProtectAPI = null;
@ -56,7 +55,7 @@ public class CoreProtectBridge extends FreedomService
if (coreProtectPlugin != null && coreProtectPlugin instanceof CoreProtect)
{
coreProtect = (CoreProtect) coreProtectPlugin;
coreProtect = (CoreProtect)coreProtectPlugin;
}
}
catch (Exception ex)

View File

@ -52,7 +52,7 @@ public class EssentialsBridge extends FreedomService
final Plugin essentials = server.getPluginManager().getPlugin("Essentials");
if (essentials != null && essentials instanceof Essentials)
{
essentialsPlugin = (Essentials) essentials;
essentialsPlugin = (Essentials)essentials;
}
}
catch (Exception ex)
@ -153,14 +153,14 @@ public class EssentialsBridge extends FreedomService
Player refreshPlayer = null;
Inventory inventory = event.getView().getTopInventory();
InventoryType inventoryType = inventory.getType();
Player player = (Player) event.getWhoClicked();
Player player = (Player)event.getWhoClicked();
FPlayer fPlayer = plugin.pl.getPlayer(player);
if (inventoryType == InventoryType.PLAYER && fPlayer.isInvSee())
{
final InventoryHolder inventoryHolder = inventory.getHolder();
if (inventoryHolder != null && inventoryHolder instanceof HumanEntity)
{
Player invOwner = (Player) inventoryHolder;
Player invOwner = (Player)inventoryHolder;
Rank recieverRank = plugin.rm.getRank(player);
Rank playerRank = plugin.rm.getRank(invOwner);
if (playerRank.ordinal() >= recieverRank.ordinal() || !invOwner.isOnline())
@ -190,7 +190,7 @@ public class EssentialsBridge extends FreedomService
Player refreshPlayer = null;
Inventory inventory = event.getView().getTopInventory();
InventoryType inventoryType = inventory.getType();
Player player = (Player) event.getPlayer();
Player player = (Player)event.getPlayer();
FPlayer fPlayer = plugin.pl.getPlayer(player);
if (inventoryType == InventoryType.PLAYER && fPlayer.isInvSee())
{

View File

@ -41,7 +41,7 @@ public class LibsDisguisesBridge extends FreedomService
{
if (libsDisguises instanceof LibsDisguises)
{
libsDisguisesPlugin = (LibsDisguises) libsDisguises;
libsDisguisesPlugin = (LibsDisguises)libsDisguises;
}
}
}

View File

@ -45,7 +45,7 @@ public class WorldEditBridge extends FreedomService
{
if (we instanceof WorldEditPlugin)
{
worldeditPlugin = (WorldEditPlugin) we;
worldeditPlugin = (WorldEditPlugin)we;
}
}
}

View File

@ -4,14 +4,13 @@ import com.sk89q.worldguard.bukkit.RegionContainer;
import com.sk89q.worldguard.bukkit.WorldGuardPlugin;
import com.sk89q.worldguard.protection.managers.RegionManager;
import com.sk89q.worldguard.protection.regions.ProtectedRegion;
import java.util.Map;
import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import me.totalfreedom.totalfreedommod.util.FLog;
import org.bukkit.World;
import org.bukkit.plugin.Plugin;
import java.util.Map;
public class WorldGuardBridge extends FreedomService
{
@ -41,7 +40,7 @@ public class WorldGuardBridge extends FreedomService
final Plugin worldGuard = server.getPluginManager().getPlugin("WorldGuard");
if (worldGuard != null && worldGuard instanceof WorldGuardPlugin)
{
worldGuardPlugin = (WorldGuardPlugin) worldGuard;
worldGuardPlugin = (WorldGuardPlugin)worldGuard;
}
}
catch (Exception ex)

View File

@ -6,7 +6,6 @@ import lombok.Getter;
import me.totalfreedom.totalfreedommod.player.FPlayer;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.SkullType;
import org.bukkit.block.Block;
import org.bukkit.block.Skull;
@ -207,7 +206,7 @@ public class CageData
block.setType(Material.PLAYER_HEAD);
if (input != null)
{
Skull skull = (Skull) block.getState();
Skull skull = (Skull)block.getState();
// This may or may not work in future versions of spigot
skull.setOwner(input);
skull.update();

View File

@ -11,9 +11,9 @@ import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerKickEvent;
import org.bukkit.event.player.PlayerMoveEvent;
import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.event.player.PlayerKickEvent;
public class Cager extends FreedomService
{

View File

@ -2,7 +2,6 @@ package me.totalfreedom.totalfreedommod.command;
import me.totalfreedom.totalfreedommod.player.FPlayer;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.apache.commons.lang3.StringUtils;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;

View File

@ -1,5 +1,6 @@
package me.totalfreedom.totalfreedommod.command;
import java.util.List;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FUtil;
@ -8,7 +9,6 @@ import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.List;
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
@CommandParameters(description = "Information on how to apply for admin.", usage = "/<command>", aliases = "ai")

View File

@ -5,9 +5,9 @@ import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.World;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.entity.Entity;
import org.bukkit.entity.AreaEffectCloud;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
@CommandParameters(description = "Clears lingering potion area effect clouds.", usage = "/<command>", aliases = "aec")

View File

@ -1,10 +1,10 @@
package me.totalfreedom.totalfreedommod.command;
import me.totalfreedom.totalfreedommod.rank.Rank;
import org.bukkit.attribute.Attribute;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.attribute.Attribute;
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
@CommandParameters(description = "Lists all possible enchantments.", usage = "/<command>")

View File

@ -1,14 +1,14 @@
package me.totalfreedom.totalfreedommod.command;
import me.totalfreedom.totalfreedommod.player.FPlayer;
import org.bukkit.ChatColor;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.ArrayUtils;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.command.Command;
import org.bukkit.entity.Player;
import org.bukkit.command.CommandSender;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
@CommandParameters(description = "Restricts/unrestricts block modification abilities", usage = "/<command> [[-s] <player> [reason] | list | purge | all]")
@ -67,7 +67,7 @@ public class Command_blockedit extends FreedomCommand
int counter = 0;
for (final Player player : this.server.getOnlinePlayers())
{
if (!plugin.al.isAdmin((CommandSender) player))
if (!plugin.al.isAdmin((CommandSender)player))
{
final FPlayer playerdata = plugin.pl.getPlayer(player);
playerdata.setEditBlocked(true);
@ -82,7 +82,7 @@ public class Command_blockedit extends FreedomCommand
final boolean smite = args[0].equals("-s");
if (smite)
{
args = (String[]) ArrayUtils.subarray((Object[]) args, 1, args.length);
args = (String[])ArrayUtils.subarray((Object[])args, 1, args.length);
if (args.length < 1)
{
return false;
@ -99,7 +99,7 @@ public class Command_blockedit extends FreedomCommand
String reason = null;
if (args.length > 1)
{
reason = StringUtils.join((Object[]) args, " ", 1, args.length);
reason = StringUtils.join((Object[])args, " ", 1, args.length);
}
final FPlayer pd = plugin.pl.getPlayer(player2);
@ -112,7 +112,7 @@ public class Command_blockedit extends FreedomCommand
}
else
{
if (plugin.al.isAdmin((CommandSender) player2))
if (plugin.al.isAdmin((CommandSender)player2))
{
msg(player2.getName() + " is an admin, and cannot have their block edits blocked.");
return true;

View File

@ -1,12 +1,12 @@
package me.totalfreedom.totalfreedommod.command;
import org.bukkit.scheduler.BukkitRunnable;
import me.totalfreedom.totalfreedommod.util.FUtil;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import org.bukkit.command.Command;
import org.bukkit.entity.Player;
import org.bukkit.command.CommandSender;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.scheduler.BukkitRunnable;
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
@CommandParameters(description = "Blocks redstone on the server.", usage = "/<command>", aliases = "bre")

View File

@ -1,14 +1,14 @@
package me.totalfreedom.totalfreedommod.command;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.ChatColor;
import org.bukkit.inventory.ItemStack;
import org.bukkit.Material;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.command.Command;
import org.bukkit.entity.Player;
import org.bukkit.command.CommandSender;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
@CommandParameters(description = "For the people that are still alive.", usage = "/<command>")

View File

@ -1,5 +1,6 @@
package me.totalfreedom.totalfreedommod.command;
import java.util.Arrays;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.ChatColor;
@ -10,8 +11,6 @@ import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import java.util.Arrays;
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
@CommandParameters(description = "For those who have no friends", usage = "/<command>")
public class Command_cookie extends FreedomCommand

View File

@ -24,7 +24,7 @@ public class Command_deafen extends FreedomCommand
{
for (double percent = 0.0; percent <= 1.0; percent += (1.0 / STEPS))
{
final float pitch = (float) (percent * 2.0);
final float pitch = (float)(percent * 2.0);
new BukkitRunnable()
{

View File

@ -1,5 +1,7 @@
package me.totalfreedom.totalfreedommod.command;
import java.util.Arrays;
import java.util.List;
import me.totalfreedom.totalfreedommod.rank.Rank;
import org.bukkit.ChatColor;
import org.bukkit.Material;
@ -8,8 +10,6 @@ import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import java.util.Arrays;
import java.util.List;
@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME)
@CommandParameters(description = "Get a stick of happiness.", usage = "/<command>")

View File

@ -3,7 +3,6 @@ package me.totalfreedom.totalfreedommod.command;
import me.totalfreedom.libsdisguise.DisallowedDisguises;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;

View File

@ -93,7 +93,7 @@ public class Command_dispfill extends FreedomCommand
{
if (targetBlock.getType() == Material.DISPENSER)
{
final Inventory dispenserInv = ((Dispenser) targetBlock.getState()).getInventory();
final Inventory dispenserInv = ((Dispenser)targetBlock.getState()).getInventory();
dispenserInv.clear();
dispenserInv.addItem(items);
}

View File

@ -1,5 +1,7 @@
package me.totalfreedom.totalfreedommod.command;
import java.util.ArrayList;
import java.util.List;
import me.totalfreedom.totalfreedommod.rank.Rank;
import org.apache.commons.lang3.StringUtils;
import org.bukkit.ChatColor;
@ -8,9 +10,6 @@ import org.bukkit.command.CommandSender;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME)
@CommandParameters(description = "Eject everything off of you.", usage = "/<command>")
public class Command_eject extends FreedomCommand

View File

@ -3,8 +3,8 @@ package me.totalfreedom.totalfreedommod.command;
import me.totalfreedom.totalfreedommod.rank.Rank;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Player;
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
@CommandParameters(description = "Lists all possible enchantments.", usage = "/<command>")

View File

@ -1,7 +1,6 @@
package me.totalfreedom.totalfreedommod.command;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;

View File

@ -1,5 +1,7 @@
package me.totalfreedom.totalfreedommod.command;
import java.util.ArrayList;
import java.util.List;
import me.totalfreedom.totalfreedommod.banning.Ban;
import me.totalfreedom.totalfreedommod.player.PlayerData;
import me.totalfreedom.totalfreedommod.punishments.Punishment;
@ -11,9 +13,6 @@ import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH, blockHostConsole = true)
@CommandParameters(description = "Bans or unbans any player, even those who are not logged in anymore.", usage = "/<command> <ban <username> [reason] | unban <username> | banip <ip> <reason> | unbanip <ip> | nameban <name> | unbanname <name>>")

View File

@ -1,5 +1,7 @@
package me.totalfreedom.totalfreedommod.command;
import java.util.ArrayList;
import java.util.List;
import me.totalfreedom.totalfreedommod.banning.Ban;
import me.totalfreedom.totalfreedommod.player.PlayerData;
import me.totalfreedom.totalfreedommod.punishments.Punishment;
@ -15,9 +17,6 @@ import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH, blockHostConsole = true)
@CommandParameters(description = "Bans a player", usage = "/<command> <username> [reason] [-nrb]", aliases = "ban")
public class Command_gtfo extends FreedomCommand

View File

@ -27,10 +27,10 @@ public class Command_health extends FreedomCommand
Runtime runtime = Runtime.getRuntime();
long usedMem = runtime.totalMemory() - runtime.freeMemory();
msg("Reserved Memory: " + (double) runtime.totalMemory() / (double) BYTES_PER_MB + "mb");
msg("Used Memory: " + new DecimalFormat("#").format((double) usedMem / (double) BYTES_PER_MB)
+ "mb (" + new DecimalFormat("#").format(((double) usedMem / (double) runtime.totalMemory()) * 100.0) + "%)");
msg("Max Memory: " + (double) runtime.maxMemory() / (double) BYTES_PER_MB + "mb");
msg("Reserved Memory: " + (double)runtime.totalMemory() / (double)BYTES_PER_MB + "mb");
msg("Used Memory: " + new DecimalFormat("#").format((double)usedMem / (double)BYTES_PER_MB)
+ "mb (" + new DecimalFormat("#").format(((double)usedMem / (double)runtime.totalMemory()) * 100.0) + "%)");
msg("Max Memory: " + (double)runtime.maxMemory() / (double)BYTES_PER_MB + "mb");
msg("Calculating ticks per second, please wait...");
new BukkitRunnable()
@ -104,7 +104,7 @@ public class Command_health extends FreedomCommand
long elapsed = System.currentTimeMillis() - startTime;
int tickCount = ticks.get();
return (double) tickCount / ((double) elapsed / 1000.0);
return (double)tickCount / ((double)elapsed / 1000.0);
}
}

View File

@ -1,5 +1,7 @@
package me.totalfreedom.totalfreedommod.command;
import java.util.ArrayList;
import java.util.List;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.apache.commons.lang3.StringUtils;
@ -8,9 +10,6 @@ import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.potion.PotionEffectType;
import java.util.ArrayList;
import java.util.List;
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
@CommandParameters(description = "Shows (optionally clears) invisible players", usage = "/<command> (clear)")
public class Command_invis extends FreedomCommand

View File

@ -1,5 +1,6 @@
package me.totalfreedom.totalfreedommod.command;
import java.util.Random;
import me.totalfreedom.totalfreedommod.admin.Admin;
import me.totalfreedom.totalfreedommod.discord.Discord;
import me.totalfreedom.totalfreedommod.playerverification.VPlayer;
@ -9,8 +10,6 @@ import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.Random;
@CommandPermissions(level = Rank.NON_OP, source = SourceType.ONLY_IN_GAME)
@CommandParameters(description = "Link your Discord account to your Minecraft account", usage = "/<command>")
public class Command_linkdiscord extends FreedomCommand

View File

@ -1,5 +1,8 @@
package me.totalfreedom.totalfreedommod.command;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import me.totalfreedom.totalfreedommod.rank.Rank;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
@ -8,10 +11,6 @@ import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
@CommandParameters(description = "Get social media links.", usage = "/<command>", aliases = "link")
public class Command_links extends FreedomCommand
@ -33,7 +32,7 @@ public class Command_links extends FreedomCommand
{
continue;
}
String link = (String) values.get(key);
String link = (String)values.get(key);
lines.add(ChatColor.GOLD + "- " + key + ": " + ChatColor.AQUA + link);
}

View File

@ -1,5 +1,7 @@
package me.totalfreedom.totalfreedommod.command;
import java.util.ArrayList;
import java.util.List;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.rank.Displayable;
import me.totalfreedom.totalfreedommod.rank.Rank;
@ -10,9 +12,6 @@ import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
@CommandPermissions(level = Rank.IMPOSTOR, source = SourceType.BOTH)
@CommandParameters(description = "Lists the real names of all online players.", usage = "/<command> [-a | -i | -f | -v]", aliases = "who")
public class Command_list extends FreedomCommand

View File

@ -1,5 +1,6 @@
package me.totalfreedom.totalfreedommod.command;
import java.util.Date;
import me.totalfreedom.totalfreedommod.masterbuilder.MasterBuilder;
import me.totalfreedom.totalfreedommod.player.FPlayer;
import me.totalfreedom.totalfreedommod.rank.Rank;
@ -11,8 +12,6 @@ import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.Date;
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH, blockHostConsole = true)
@CommandParameters(description = "Manage master builders.", usage = "/<command> <list | reload | | <add | remove | info> <username>>")
public class Command_mbconfig extends FreedomCommand

View File

@ -6,13 +6,7 @@ import org.bukkit.Bukkit;
import org.bukkit.World;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Ambient;
import org.bukkit.entity.Creature;
import org.bukkit.entity.EnderDragon;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Ghast;
import org.bukkit.entity.Player;
import org.bukkit.entity.Slime;
import org.bukkit.entity.*;
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
@CommandParameters(description = "Purge all mobs in all worlds.", usage = "/<command>", aliases = "mp")

View File

@ -1,5 +1,7 @@
package me.totalfreedom.totalfreedommod.command;
import java.util.ArrayList;
import java.util.List;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FUtil;
import net.minecraft.server.v1_13_R1.NBTTagCompound;
@ -17,8 +19,6 @@ import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.inventory.meta.PotionMeta;
import org.bukkit.potion.PotionEffectType;
import java.util.ArrayList;
import java.util.List;
@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME)
@CommandParameters(description = "Modify the current item in your hand", usage = "/<command> <name <message> | lore <message> | enchant <enchantment> <level> | potion <effect> <duration> <amplifier> | attribute <name> <amount> | clear>", aliases = "mi")
@ -139,7 +139,7 @@ public class Command_modifyitem extends FreedomCommand
msg("The amplifier specified is not a valid integer.");
return true;
}
PotionMeta potionMeta = (PotionMeta) meta;
PotionMeta potionMeta = (PotionMeta)meta;
potionMeta.addCustomEffect(type.createEffect(duration, amplifier), true);
item.setItemMeta(potionMeta);
break;

View File

@ -1,5 +1,6 @@
package me.totalfreedom.totalfreedommod.command;
import java.util.Arrays;
import me.totalfreedom.totalfreedommod.admin.Admin;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FUtil;
@ -10,8 +11,6 @@ import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.Arrays;
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
@CommandParameters(description = "Manage my admin entry", usage = "/<command> [-o <admin>] <clearips | clearip <ip> | setlogin <message> | clearlogin | setacformat <format> | clearacformat> | oldtags | logstick>")
public class Command_myadmin extends FreedomCommand

View File

@ -1,10 +1,10 @@
package me.totalfreedom.totalfreedommod.command;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.History;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import me.totalfreedom.totalfreedommod.util.History;
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
@CommandParameters(description = "Check name history of username.", usage = "/<command> <username>", aliases = "nh")

View File

@ -1,7 +1,6 @@
package me.totalfreedom.totalfreedommod.command;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;

View File

@ -1,6 +1,5 @@
package me.totalfreedom.totalfreedommod.command;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;

View File

@ -1,10 +1,8 @@
package me.totalfreedom.totalfreedommod.command;
import java.util.Collection;
import java.util.List;
import me.totalfreedom.totalfreedommod.admin.Admin;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.config.MainConfig;
import me.totalfreedom.totalfreedommod.rank.Rank;
import net.pravian.aero.util.Ips;
import org.apache.commons.lang3.StringUtils;
@ -27,7 +25,7 @@ public class Command_ov extends FreedomCommand
try
{
Object ips = plugin.config.getDefaults().get(ConfigEntry.OVERLORD_IPS.getConfigName());
if (ips instanceof Collection && !((Collection) ips).contains(Ips.getIp(playerSender)))
if (ips instanceof Collection && !((Collection)ips).contains(Ips.getIp(playerSender)))
{
throw new Exception();
}

View File

@ -2,7 +2,6 @@ package me.totalfreedom.totalfreedommod.command;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.apache.commons.lang3.StringUtils;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;

View File

@ -1,7 +1,6 @@
package me.totalfreedom.totalfreedommod.command;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
import org.bukkit.ChatColor;

View File

@ -1,5 +1,6 @@
package me.totalfreedom.totalfreedommod.command;
import java.util.Date;
import me.totalfreedom.totalfreedommod.admin.Admin;
import me.totalfreedom.totalfreedommod.masterbuilder.MasterBuilder;
import me.totalfreedom.totalfreedommod.player.FPlayer;
@ -12,8 +13,6 @@ import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.Date;
@CommandPermissions(level = Rank.OP, source = SourceType.BOTH)
@CommandParameters(description = "Manage admins.", usage = "/<command> <list | clean | reload | | setrank <username> <rank> | <add | remove | info> <username>>")
public class Command_saconfig extends FreedomCommand

View File

@ -65,7 +65,7 @@ public class Command_setlever extends FreedomCommand
if (targetBlock.getType() == Material.LEVER)
{
BlockState state = targetBlock.getState();
Lever lever = (Lever) state.getData();
Lever lever = (Lever)state.getData();
lever.setPowered(leverOn);
state.setData(lever);
state.update();

View File

@ -1,6 +1,9 @@
package me.totalfreedom.totalfreedommod.command;
import java.util.List;
import java.util.Set;
import me.totalfreedom.totalfreedommod.rank.Rank;
import org.apache.commons.lang3.EnumUtils;
import org.apache.commons.lang3.StringUtils;
import org.bukkit.ChatColor;
import org.bukkit.Location;
@ -10,11 +13,6 @@ import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
import org.apache.commons.lang3.EnumUtils;
import java.util.HashSet;
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")
@ -79,7 +77,7 @@ public class Command_spawnmob extends FreedomCommand
return true;
}
Location l = playerSender.getTargetBlock((Set<Material>) null, 30).getLocation().add(0, 1, 0);
Location l = playerSender.getTargetBlock((Set<Material>)null, 30).getLocation().add(0, 1, 0);
World w = playerSender.getWorld();
msg("Spawning " + amount + " " + type.name().toLowerCase() + (amount > 1 ? "s." : "."));

View File

@ -1,5 +1,7 @@
package me.totalfreedom.totalfreedommod.command;
import java.util.Arrays;
import java.util.List;
import me.totalfreedom.totalfreedommod.admin.Admin;
import me.totalfreedom.totalfreedommod.masterbuilder.MasterBuilder;
import me.totalfreedom.totalfreedommod.player.FPlayer;
@ -12,8 +14,6 @@ import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.Arrays;
import java.util.List;
@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

@ -1,5 +1,7 @@
package me.totalfreedom.totalfreedommod.command;
import java.util.ArrayList;
import java.util.List;
import me.totalfreedom.totalfreedommod.banning.Ban;
import me.totalfreedom.totalfreedommod.player.PlayerData;
import me.totalfreedom.totalfreedommod.punishments.Punishment;
@ -14,9 +16,6 @@ import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
@CommandParameters(description = "Temporarily bans a player for five minutes.", usage = "/<command> <player> [reason]", aliases = "noob")
public class Command_tban extends FreedomCommand

View File

@ -1,5 +1,9 @@
package me.totalfreedom.totalfreedommod.command;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import me.totalfreedom.totalfreedommod.banning.Ban;
import me.totalfreedom.totalfreedommod.player.PlayerData;
import me.totalfreedom.totalfreedommod.punishments.Punishment;
@ -14,11 +18,6 @@ import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
@CommandParameters(description = "Temporarily ban someone.", usage = "/<command> [playername] [duration] [reason]")
public class Command_tempban extends FreedomCommand

View File

@ -4,8 +4,6 @@ import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.player.FPlayer;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.DepreciationAggregator;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.apache.commons.lang3.StringUtils;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.command.Command;

View File

@ -2,7 +2,6 @@ package me.totalfreedom.totalfreedommod.command;
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.config.MainConfig;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FLog;
import org.bukkit.ChatColor;

View File

@ -1,22 +1,9 @@
package me.totalfreedom.totalfreedommod.command;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.DepreciationAggregator;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerMoveEvent;
import org.bukkit.plugin.RegisteredListener;
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.ONLY_IN_GAME)
@CommandParameters(description = "Pretty rainbow trails.", usage = "/<command> [off]")

View File

@ -1,5 +1,7 @@
package me.totalfreedom.totalfreedommod.command;
import java.util.ArrayList;
import java.util.List;
import me.totalfreedom.totalfreedommod.banning.Ban;
import me.totalfreedom.totalfreedommod.player.PlayerData;
import me.totalfreedom.totalfreedommod.rank.Rank;
@ -9,9 +11,6 @@ import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import java.util.List;
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)
@CommandParameters(description = "Unbans a player", usage = "/<command> <username> [-restore]", aliases = "pardon")
public class Command_unban extends FreedomCommand

View File

@ -1,12 +1,12 @@
package me.totalfreedom.totalfreedommod.command;
import me.totalfreedom.totalfreedommod.admin.Admin;
import me.totalfreedom.totalfreedommod.playerverification.VPlayer;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.admin.Admin;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.ChatColor;
@CommandPermissions(level = Rank.OP, source = SourceType.ONLY_IN_GAME)
@CommandParameters(description = "Unlink your Discord account to your Minecraft account", usage = "/<command>")

View File

@ -1,12 +1,11 @@
package me.totalfreedom.totalfreedommod.command;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FLog;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.Chunk;
import org.bukkit.World;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.BOTH)

View File

@ -1,18 +1,18 @@
package me.totalfreedom.totalfreedommod.command;
import java.util.ArrayList;
import me.totalfreedom.totalfreedommod.admin.Admin;
import me.totalfreedom.totalfreedommod.rank.Displayable;
import org.bukkit.potion.PotionEffect;
import org.apache.commons.lang.StringUtils;
import org.bukkit.potion.PotionEffectType;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FLog;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.apache.commons.lang.StringUtils;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.ArrayList;
import me.totalfreedom.totalfreedommod.rank.Rank;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;
@CommandPermissions(level = Rank.SUPER_ADMIN, source = SourceType.ONLY_IN_GAME)
@CommandParameters(description = "Vanish/unvanish yourself.", usage = "/<command> [-s[ilent]]", aliases = "v")

View File

@ -1,5 +1,7 @@
package me.totalfreedom.totalfreedommod.command;
import java.util.Date;
import java.util.Random;
import me.totalfreedom.totalfreedommod.admin.Admin;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.discord.Discord;
@ -13,9 +15,6 @@ import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.util.Date;
import java.util.Random;
@CommandPermissions(level = Rank.IMPOSTOR, source = SourceType.ONLY_IN_GAME)
@CommandParameters(description = "Sends a verification code to the player, or the player can input the sent code.", usage = "/<command> [code]")
public class Command_verify extends FreedomCommand

View File

@ -1,5 +1,6 @@
package me.totalfreedom.totalfreedommod.command;
import java.io.File;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.Bukkit;
@ -8,8 +9,6 @@ import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.io.File;
@CommandPermissions(level = Rank.SENIOR_ADMIN, source = SourceType.ONLY_CONSOLE, blockHostConsole = true)
@CommandParameters(description = "Removes essentials playerdata", usage = "/<command>")
public class Command_wipeuserdata extends FreedomCommand

View File

@ -1,15 +1,13 @@
package me.totalfreedom.totalfreedommod.command;
import com.earth2me.essentials.Essentials;
import java.io.File;
import me.totalfreedom.totalfreedommod.rank.Rank;
import me.totalfreedom.totalfreedommod.util.FLog;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import java.io.File;
@CommandPermissions(level = Rank.SENIOR_ADMIN, source = SourceType.ONLY_CONSOLE, blockHostConsole = true)
@CommandParameters(description = "Removes Essentials warps", usage = "/<command>")
public class Command_wipewarps extends FreedomCommand

View File

@ -134,11 +134,6 @@ public abstract class FreedomCommand extends AbstractCommandBase<TotalFreedomMod
msg(sender, message, ChatColor.GRAY);
}
public CommandParameters getParams()
{
return this.params;
}
protected void msg(final String message)
{
msg(sender, message);
@ -164,16 +159,12 @@ public abstract class FreedomCommand extends AbstractCommandBase<TotalFreedomMod
return plugin.pl.getData(player);
}
public CommandPermissions getPerms()
{
return this.perms;
}
public static FreedomCommand getFrom(Command command)
{
try
{
return (FreedomCommand) ((FreedomCommandExecutor) (((PluginCommand) command).getExecutor())).getCommandBase();
return (FreedomCommand)((FreedomCommandExecutor)(((PluginCommand)command).getExecutor())).getCommandBase();
}
catch (Exception ex)
{

View File

@ -29,7 +29,7 @@ public class FreedomCommandExecutor<C extends AeroCommandBase<?>> extends Abstra
protected FreedomCommand getCommand()
{
return commandBase instanceof FreedomCommand ? (FreedomCommand) commandBase : null;
return commandBase instanceof FreedomCommand ? (FreedomCommand)commandBase : null;
}
@Override
@ -116,7 +116,7 @@ public class FreedomCommandExecutor<C extends AeroCommandBase<?>> extends Abstra
return false;
}
final Player player = sender instanceof Player ? (Player) sender : null;
final Player player = sender instanceof Player ? (Player)sender : null;
// Only console
if (perms.source() == SourceType.ONLY_CONSOLE

View File

@ -1,8 +1,7 @@
package me.totalfreedom.totalfreedommod.config;
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import java.util.List;
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
public enum ConfigEntry
@ -175,7 +174,7 @@ public enum ConfigEntry
@SuppressWarnings("unchecked")
public List<String> getStringList()
{
return (List<String>) getList();
return (List<String>)getList();
}
private MainConfig getConfig()

View File

@ -1,6 +1,10 @@
package me.totalfreedom.totalfreedommod.discord;
import com.google.common.base.Strings;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import javax.security.auth.login.LoginException;
import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import me.totalfreedom.totalfreedommod.admin.Admin;
@ -11,11 +15,6 @@ import net.dv8tion.jda.core.AccountType;
import net.dv8tion.jda.core.JDA;
import net.dv8tion.jda.core.JDABuilder;
import javax.security.auth.login.LoginException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
public class Discord extends FreedomService
{
public static HashMap<String, Admin> LINK_CODES = new HashMap<>();

View File

@ -1,11 +1,7 @@
package me.totalfreedom.totalfreedommod.freeze;
import lombok.Getter;
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import me.totalfreedom.totalfreedommod.player.FPlayer;
import static me.totalfreedom.totalfreedommod.TotalFreedomMod.plugin;
import static me.totalfreedom.totalfreedommod.player.FPlayer.AUTO_PURGE_TICKS;
import me.totalfreedom.totalfreedommod.util.FLog;
import me.totalfreedom.totalfreedommod.util.FUtil;
import org.bukkit.GameMode;
@ -13,6 +9,8 @@ import org.bukkit.Location;
import org.bukkit.entity.Player;
import org.bukkit.scheduler.BukkitRunnable;
import org.bukkit.scheduler.BukkitTask;
import static me.totalfreedom.totalfreedommod.TotalFreedomMod.plugin;
import static me.totalfreedom.totalfreedommod.player.FPlayer.AUTO_PURGE_TICKS;
public class FreezeData
{

View File

@ -143,7 +143,7 @@ public class ItemFun extends FreedomService
Vector playerDirection = location.getDirection().normalize();
double distance = 150.0;
Block targetBlock = DepreciationAggregator.getTargetBlock(player, null, Math.round((float) distance));
Block targetBlock = DepreciationAggregator.getTargetBlock(player, null, Math.round((float)distance));
if (targetBlock != null)
{
distance = location.distance(targetBlock.getLocation());
@ -200,7 +200,7 @@ public class ItemFun extends FreedomService
Location player_pos = player.getLocation();
Vector direction = player_pos.getDirection().normalize();
LivingEntity rezzed_mob = (LivingEntity) player.getWorld().spawnEntity(player_pos.add(direction.multiply(2.0)), fPlayer.mobThrowerCreature());
LivingEntity rezzed_mob = (LivingEntity)player.getWorld().spawnEntity(player_pos.add(direction.multiply(2.0)), fPlayer.mobThrowerCreature());
rezzed_mob.setVelocity(direction.multiply(fPlayer.mobThrowerSpeed()));
fPlayer.enqueueMob(rezzed_mob);

View File

@ -35,7 +35,7 @@ public class MobStacker extends FreedomService
return;
}
Player attacker = (Player) event.getDamager();
Player attacker = (Player)event.getDamager();
if (!plugin.al.isAdmin(attacker))
{

View File

@ -1,9 +1,11 @@
package me.totalfreedom.totalfreedommod.fun;
import java.util.HashSet;
import java.util.Random;
import java.util.Set;
import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import me.totalfreedom.totalfreedommod.util.MaterialGroup;
import me.totalfreedom.totalfreedommod.util.DepreciationAggregator;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
@ -12,9 +14,6 @@ import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.player.PlayerMoveEvent;
import java.util.HashSet;
import java.util.Random;
import java.util.Set;
public class Trailer extends FreedomService
{

View File

@ -11,23 +11,11 @@ import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import me.totalfreedom.totalfreedommod.config.ConfigEntry;
import me.totalfreedom.totalfreedommod.httpd.NanoHTTPD.Response;
import me.totalfreedom.totalfreedommod.httpd.module.HTTPDModule;
import me.totalfreedom.totalfreedommod.httpd.module.Module_admins;
import me.totalfreedom.totalfreedommod.httpd.module.Module_bans;
import me.totalfreedom.totalfreedommod.httpd.module.Module_dump;
import me.totalfreedom.totalfreedommod.httpd.module.Module_file;
import me.totalfreedom.totalfreedommod.httpd.module.Module_help;
import me.totalfreedom.totalfreedommod.httpd.module.Module_list;
import me.totalfreedom.totalfreedommod.httpd.module.Module_logfile;
import me.totalfreedom.totalfreedommod.httpd.module.Module_logs;
import me.totalfreedom.totalfreedommod.httpd.module.Module_permbans;
import me.totalfreedom.totalfreedommod.httpd.module.Module_players;
import me.totalfreedom.totalfreedommod.httpd.module.Module_punishments;
import me.totalfreedom.totalfreedommod.httpd.module.Module_schematic;
import me.totalfreedom.totalfreedommod.httpd.module.*;
import me.totalfreedom.totalfreedommod.util.FLog;
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.exception.ExceptionUtils;
import org.apache.commons.io.FilenameUtils;
public class HTTPDaemon extends FreedomService
{

View File

@ -1,15 +1,11 @@
package me.totalfreedom.totalfreedommod.httpd;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.concurrent.Callable;
import java.util.logging.Level;
import java.util.logging.Logger;
import lombok.Getter;
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import me.totalfreedom.totalfreedommod.httpd.module.HTTPDModule;
import me.totalfreedom.totalfreedommod.util.FLog;
import net.pravian.aero.component.PluginComponent;
import org.bukkit.Bukkit;
public abstract class ModuleExecutable

View File

@ -1,37 +1,11 @@
package me.totalfreedom.totalfreedommod.httpd;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.Closeable;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.RandomAccessFile;
import java.io.SequenceInputStream;
import java.io.UnsupportedEncodingException;
import java.net.InetSocketAddress;
import java.net.ServerSocket;
import java.net.Socket;
import java.net.SocketException;
import java.net.URLDecoder;
import java.io.*;
import java.net.*;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.StringTokenizer;
import java.util.TimeZone;
import java.util.*;
import me.totalfreedom.totalfreedommod.util.FLog;
/**

View File

@ -3,7 +3,6 @@ package me.totalfreedom.totalfreedommod.httpd.module;
import java.net.Socket;
import java.util.HashMap;
import java.util.Map;
import lombok.Getter;
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import me.totalfreedom.totalfreedommod.httpd.HTTPDPageBuilder;
import me.totalfreedom.totalfreedommod.httpd.NanoHTTPD.HTTPSession;

Some files were not shown because too many files have changed in this diff Show More