Cleanup
This commit is contained in:
parent
c7384a45f4
commit
bd416059bc
@ -12,12 +12,8 @@ import org.bukkit.World;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class CmdStuck extends FCommand {
|
public class CmdStuck extends FCommand {
|
||||||
|
|
||||||
private final static Random random = new Random();
|
|
||||||
|
|
||||||
public CmdStuck() {
|
public CmdStuck() {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
|
@ -264,7 +264,6 @@ public class FactionsEntityListener implements Listener {
|
|||||||
public boolean canDamagerHurtDamagee(EntityDamageByEntityEvent sub, boolean notify) {
|
public boolean canDamagerHurtDamagee(EntityDamageByEntityEvent sub, boolean notify) {
|
||||||
Entity damager = sub.getDamager();
|
Entity damager = sub.getDamager();
|
||||||
Entity damagee = sub.getEntity();
|
Entity damagee = sub.getEntity();
|
||||||
double damage = sub.getDamage();
|
|
||||||
|
|
||||||
if (!(damagee instanceof Player)) {
|
if (!(damagee instanceof Player)) {
|
||||||
return true;
|
return true;
|
||||||
|
@ -104,7 +104,6 @@ public class BufferedObjective {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
public void flip() {
|
public void flip() {
|
||||||
if (!requiresUpdate) {
|
if (!requiresUpdate) {
|
||||||
return;
|
return;
|
||||||
|
@ -15,7 +15,9 @@ import java.util.Map.Entry;
|
|||||||
public abstract class MemoryBoard extends Board {
|
public abstract class MemoryBoard extends Board {
|
||||||
|
|
||||||
public class MemoryBoardMap extends HashMap<FLocation, String> {
|
public class MemoryBoardMap extends HashMap<FLocation, String> {
|
||||||
Multimap<String, FLocation> factionToLandMap = HashMultimap.create();
|
private static final long serialVersionUID = -6689617828610585368L;
|
||||||
|
|
||||||
|
Multimap<String, FLocation> factionToLandMap = HashMultimap.create();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String put(FLocation floc, String factionId) {
|
public String put(FLocation floc, String factionId) {
|
||||||
|
@ -122,7 +122,7 @@ public class JSONFPlayers extends MemoryFPlayers {
|
|||||||
|
|
||||||
// Start fetching those UUIDs
|
// Start fetching those UUIDs
|
||||||
Bukkit.getLogger().log(Level.INFO, "Please wait while Factions converts " + list.size() + " old player names to UUID. This may take a while.");
|
Bukkit.getLogger().log(Level.INFO, "Please wait while Factions converts " + list.size() + " old player names to UUID. This may take a while.");
|
||||||
UUIDFetcher fetcher = new UUIDFetcher(new ArrayList(list));
|
UUIDFetcher fetcher = new UUIDFetcher(new ArrayList<String>(list));
|
||||||
try {
|
try {
|
||||||
Map<String, UUID> response = fetcher.call();
|
Map<String, UUID> response = fetcher.call();
|
||||||
for (String s : list) {
|
for (String s : list) {
|
||||||
|
@ -136,7 +136,7 @@ public class JSONFactions extends MemoryFactions {
|
|||||||
Set<String> list = whichKeysNeedMigration(set);
|
Set<String> list = whichKeysNeedMigration(set);
|
||||||
|
|
||||||
if (list.size() > 0) {
|
if (list.size() > 0) {
|
||||||
UUIDFetcher fetcher = new UUIDFetcher(new ArrayList(list));
|
UUIDFetcher fetcher = new UUIDFetcher(new ArrayList<String>(list));
|
||||||
try {
|
try {
|
||||||
Map<String, UUID> response = fetcher.call();
|
Map<String, UUID> response = fetcher.call();
|
||||||
for (String value : response.keySet()) {
|
for (String value : response.keySet()) {
|
||||||
@ -163,7 +163,7 @@ public class JSONFactions extends MemoryFactions {
|
|||||||
Set<String> list = whichKeysNeedMigration(invites);
|
Set<String> list = whichKeysNeedMigration(invites);
|
||||||
|
|
||||||
if (list.size() > 0) {
|
if (list.size() > 0) {
|
||||||
UUIDFetcher fetcher = new UUIDFetcher(new ArrayList(list));
|
UUIDFetcher fetcher = new UUIDFetcher(new ArrayList<String>(list));
|
||||||
try {
|
try {
|
||||||
Map<String, UUID> response = fetcher.call();
|
Map<String, UUID> response = fetcher.call();
|
||||||
for (String value : response.keySet()) {
|
for (String value : response.keySet()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user