Code Reformat
This commit is contained in:
parent
bc62491862
commit
9b68687ef7
@ -24,7 +24,6 @@ import java.util.concurrent.ConcurrentHashMap;
|
|||||||
public interface Faction extends EconomyParticipator {
|
public interface Faction extends EconomyParticipator {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int getWallCheckMinutes();
|
int getWallCheckMinutes();
|
||||||
|
|
||||||
void setWallCheckMinutes(int minutes);
|
void setWallCheckMinutes(int minutes);
|
||||||
|
@ -239,7 +239,7 @@ public class P extends MPlugin {
|
|||||||
}
|
}
|
||||||
log("Skript addon registered!");
|
log("Skript addon registered!");
|
||||||
}
|
}
|
||||||
if(Conf.useCheckSystem) {
|
if (Conf.useCheckSystem) {
|
||||||
int minute = 1200;
|
int minute = 1200;
|
||||||
this.getServer().getScheduler().runTaskTimerAsynchronously(this, new CheckTask(this, 3), 0L, (long) (minute * 3));
|
this.getServer().getScheduler().runTaskTimerAsynchronously(this, new CheckTask(this, 3), 0L, (long) (minute * 3));
|
||||||
this.getServer().getScheduler().runTaskTimerAsynchronously(this, new CheckTask(this, 5), 0L, (long) (minute * 5));
|
this.getServer().getScheduler().runTaskTimerAsynchronously(this, new CheckTask(this, 5), 0L, (long) (minute * 5));
|
||||||
|
@ -302,7 +302,7 @@ public class FCmdRoot extends FCommand {
|
|||||||
if (P.p.getConfig().getBoolean("enable-faction-flight", false)) {
|
if (P.p.getConfig().getBoolean("enable-faction-flight", false)) {
|
||||||
this.addSubCommand(this.cmdFly);
|
this.addSubCommand(this.cmdFly);
|
||||||
}
|
}
|
||||||
if (Bukkit.getServer().getPluginManager().getPlugin("FactionsTop") != null || Bukkit.getServer().getPluginManager().getPlugin("SavageFTOP") != null || Bukkit.getServer().getPluginManager().getPlugin("SaberFTOP") != null) {
|
if (Bukkit.getServer().getPluginManager().getPlugin("FactionsTop") != null || Bukkit.getServer().getPluginManager().getPlugin("SavageFTOP") != null || Bukkit.getServer().getPluginManager().getPlugin("SaberFTOP") != null) {
|
||||||
P.p.log(Level.INFO, "Found FactionsTop plugin. Disabling our own /f top command.");
|
P.p.log(Level.INFO, "Found FactionsTop plugin. Disabling our own /f top command.");
|
||||||
} else {
|
} else {
|
||||||
P.p.log(Level.INFO, "Enabling FactionsTop command, this is a very basic /f top please get a dedicated /f top resource if you want land calculation etc.");
|
P.p.log(Level.INFO, "Enabling FactionsTop command, this is a very basic /f top please get a dedicated /f top resource if you want land calculation etc.");
|
||||||
|
@ -103,7 +103,7 @@ public class CheckSettingsFrame implements InventoryHolder, FactionGUI {
|
|||||||
return minutes + " Minutes";
|
return minutes + " Minutes";
|
||||||
}
|
}
|
||||||
|
|
||||||
public String color(String message){
|
public String color(String message) {
|
||||||
return ChatColor.translateAlternateColorCodes('&', message);
|
return ChatColor.translateAlternateColorCodes('&', message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,9 +13,9 @@ import java.util.List;
|
|||||||
import java.util.concurrent.CopyOnWriteArrayList;
|
import java.util.concurrent.CopyOnWriteArrayList;
|
||||||
|
|
||||||
public class CheckTask implements Runnable {
|
public class CheckTask implements Runnable {
|
||||||
private SimpleDateFormat simpleDateFormat = new SimpleDateFormat(Conf.dateFormat);
|
|
||||||
private static List<String> wallChecks = new CopyOnWriteArrayList<>();
|
private static List<String> wallChecks = new CopyOnWriteArrayList<>();
|
||||||
private static List<String> bufferChecks = new CopyOnWriteArrayList<>();
|
private static List<String> bufferChecks = new CopyOnWriteArrayList<>();
|
||||||
|
private SimpleDateFormat simpleDateFormat = new SimpleDateFormat(Conf.dateFormat);
|
||||||
private P plugin;
|
private P plugin;
|
||||||
private int minute;
|
private int minute;
|
||||||
|
|
||||||
@ -43,6 +43,14 @@ public class CheckTask implements Runnable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean wallCheck(String factionId) {
|
||||||
|
return CheckTask.wallChecks.remove(factionId);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean bufferCheck(String factionId) {
|
||||||
|
return CheckTask.bufferChecks.remove(factionId);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
long currentTime = System.currentTimeMillis();
|
long currentTime = System.currentTimeMillis();
|
||||||
@ -86,13 +94,5 @@ public class CheckTask implements Runnable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean wallCheck(String factionId) {
|
|
||||||
return CheckTask.wallChecks.remove(factionId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean bufferCheck(String factionId) {
|
|
||||||
return CheckTask.bufferChecks.remove(factionId);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,6 +20,6 @@ public class WeeWooTask implements Runnable {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
faction.msg(TL.WEE_WOO_MESSAGE);
|
faction.msg(TL.WEE_WOO_MESSAGE);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
@ -7,12 +7,13 @@ import org.bukkit.event.Cancellable;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents {@link Role} change of a factions player
|
* Represents {@link Role} change of a factions player
|
||||||
|
*
|
||||||
* @see FPlayer#getRole()
|
* @see FPlayer#getRole()
|
||||||
*/
|
*/
|
||||||
public class FPlayerRoleChangeEvent extends FactionPlayerEvent implements Cancellable {
|
public class FPlayerRoleChangeEvent extends FactionPlayerEvent implements Cancellable {
|
||||||
|
|
||||||
private boolean cancelled;
|
|
||||||
private final Role from;
|
private final Role from;
|
||||||
|
private boolean cancelled;
|
||||||
private Role to;
|
private Role to;
|
||||||
|
|
||||||
public FPlayerRoleChangeEvent(Faction faction, FPlayer fPlayer, Role from, Role to) {
|
public FPlayerRoleChangeEvent(Faction faction, FPlayer fPlayer, Role from, Role to) {
|
||||||
|
@ -101,7 +101,7 @@ public class FactionsPlayerListener implements Listener {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(me.getFaction() == otherFaction) return true;
|
if (me.getFaction() == otherFaction) return true;
|
||||||
|
|
||||||
if (P.p.getConfig().getBoolean("hcf.raidable", false) && otherFaction.getLandRounded() > otherFaction.getPowerRounded()) {
|
if (P.p.getConfig().getBoolean("hcf.raidable", false) && otherFaction.getLandRounded() > otherFaction.getPowerRounded()) {
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user