From e901cae995c10c4115085ce662e5966d2dd0bc03 Mon Sep 17 00:00:00 2001 From: Olof Larsson Date: Mon, 22 Apr 2013 10:05:03 +0200 Subject: [PATCH] Moving more stuff and removing useless lwc integration config option. --- src/com/massivecraft/factions/ConfServer.java | 26 ------------------- .../factions/cmd/CmdFactionsCreate.java | 4 +-- .../factions/cmd/CmdFactionsDisband.java | 7 +++-- .../factions/cmd/CmdFactionsJoin.java | 3 ++- .../factions/cmd/CmdFactionsKick.java | 5 ++-- .../factions/cmd/CmdFactionsMoneyDeposit.java | 4 +-- .../cmd/CmdFactionsMoneyTransferFf.java | 4 +-- .../cmd/CmdFactionsMoneyTransferFp.java | 4 +-- .../cmd/CmdFactionsMoneyTransferPf.java | 4 +-- .../cmd/CmdFactionsMoneyWithdraw.java | 4 +-- .../factions/cmd/CmdFactionsUnclaim.java | 3 ++- .../factions/cmd/CmdFactionsUnclaimall.java | 3 ++- .../massivecraft/factions/entity/FPlayer.java | 12 ++++++--- .../factions/entity/FPlayerColl.java | 2 +- .../massivecraft/factions/entity/Faction.java | 2 +- .../massivecraft/factions/entity/MConf.java | 23 ++++++++++++++++ .../factions/integration/LWCFeatures.java | 6 ++--- .../listeners/FactionsListenerExploit.java | 10 +++---- 18 files changed, 67 insertions(+), 59 deletions(-) diff --git a/src/com/massivecraft/factions/ConfServer.java b/src/com/massivecraft/factions/ConfServer.java index 64deab28..1cfd2d6f 100644 --- a/src/com/massivecraft/factions/ConfServer.java +++ b/src/com/massivecraft/factions/ConfServer.java @@ -75,8 +75,6 @@ public class ConfServer extends SimpleConfig // Disallow joining/leaving/kicking while power is negative public static boolean canLeaveWithNegativePower = true; - - // -------------------------------------------- // // AUTO LEAVE @@ -96,33 +94,9 @@ public class ConfServer extends SimpleConfig // INTEGRATION: LWC // -------------------------------------------- // - public static boolean lwcIntegration = false; public static boolean onUnclaimResetLwcLocks = false; public static boolean onCaptureResetLwcLocks = false; - - // -------------------------------------------- // - // LOGGING - // -------------------------------------------- // - public static boolean logFactionCreate = true; - public static boolean logFactionDisband = true; - public static boolean logFactionJoin = true; - public static boolean logFactionKick = true; - public static boolean logFactionLeave = true; - public static boolean logLandClaims = true; - public static boolean logLandUnclaims = true; - public static boolean logMoneyTransactions = true; - public static boolean logPlayerCommands = true; - - // -------------------------------------------- // - // EXPLOITS - // -------------------------------------------- // - - public static boolean handleExploitObsidianGenerators = true; - public static boolean handleExploitEnderPearlClipping = true; - public static boolean handleExploitInteractionSpam = true; - public static boolean handleExploitTNTWaterlog = false; - // -------------------------------------------- // // HOMES // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsCreate.java b/src/com/massivecraft/factions/cmd/CmdFactionsCreate.java index 7677b145..94507aa2 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsCreate.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsCreate.java @@ -2,7 +2,6 @@ package com.massivecraft.factions.cmd; import java.util.ArrayList; -import com.massivecraft.factions.ConfServer; import com.massivecraft.factions.Factions; import com.massivecraft.factions.Perm; import com.massivecraft.factions.Rel; @@ -10,6 +9,7 @@ import com.massivecraft.factions.entity.FPlayer; import com.massivecraft.factions.entity.FPlayerColl; import com.massivecraft.factions.entity.Faction; import com.massivecraft.factions.entity.FactionColl; +import com.massivecraft.factions.entity.MConf; import com.massivecraft.factions.event.FactionsEventCreate; import com.massivecraft.factions.event.FactionsEventMembershipChange; import com.massivecraft.factions.event.FactionsEventMembershipChange.MembershipChangeReason; @@ -79,7 +79,7 @@ public class CmdFactionsCreate extends FCommand msg("You should now: %s", Factions.get().getOuterCmdFactions().cmdFactionsDescription.getUseageTemplate()); - if (ConfServer.logFactionCreate) + if (MConf.get().logFactionCreate) { Factions.get().log(fme.getName()+" created a new faction: "+newTag); } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsDisband.java b/src/com/massivecraft/factions/cmd/CmdFactionsDisband.java index 26466e72..54d1f8c7 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsDisband.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsDisband.java @@ -1,11 +1,11 @@ package com.massivecraft.factions.cmd; -import com.massivecraft.factions.ConfServer; import com.massivecraft.factions.cmd.arg.ARFaction; import com.massivecraft.factions.entity.FPlayer; import com.massivecraft.factions.entity.FPlayerColl; import com.massivecraft.factions.entity.Faction; import com.massivecraft.factions.entity.FactionColl; +import com.massivecraft.factions.entity.MConf; import com.massivecraft.factions.event.FactionsEventDisband; import com.massivecraft.factions.event.FactionsEventMembershipChange; import com.massivecraft.factions.event.FactionsEventMembershipChange.MembershipChangeReason; @@ -73,8 +73,11 @@ public class CmdFactionsDisband extends FCommand fplayer.msg("%s disbanded the faction %s.", who, faction.getTag(fplayer)); } } - if (ConfServer.logFactionDisband) + + if (MConf.get().logFactionDisband) + { Factions.get().log("The faction "+faction.getTag()+" ("+faction.getId()+") was disbanded by "+(senderIsConsole ? "console command" : fme.getName())+"."); + } if (Econ.isEnabled(faction)) { diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsJoin.java b/src/com/massivecraft/factions/cmd/CmdFactionsJoin.java index 637eaa8f..8355f90c 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsJoin.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsJoin.java @@ -7,6 +7,7 @@ import com.massivecraft.factions.cmd.arg.ARFPlayer; import com.massivecraft.factions.cmd.arg.ARFaction; import com.massivecraft.factions.entity.FPlayer; import com.massivecraft.factions.entity.Faction; +import com.massivecraft.factions.entity.MConf; import com.massivecraft.factions.event.FactionsEventMembershipChange; import com.massivecraft.factions.event.FactionsEventMembershipChange.MembershipChangeReason; import com.massivecraft.mcore.cmd.req.ReqHasPerm; @@ -97,7 +98,7 @@ public class CmdFactionsJoin extends FCommand faction.setInvited(fplayer, false); // Derplog - if (ConfServer.logFactionJoin) + if (MConf.get().logFactionJoin) { if (samePlayer) Factions.get().log("%s joined the faction %s.", fplayer.getName(), faction.getTag()); diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsKick.java b/src/com/massivecraft/factions/cmd/CmdFactionsKick.java index 75bee2ca..16032f3b 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsKick.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsKick.java @@ -9,6 +9,7 @@ import com.massivecraft.factions.cmd.arg.ARFPlayer; import com.massivecraft.factions.entity.FPlayer; import com.massivecraft.factions.entity.Faction; import com.massivecraft.factions.entity.FactionColl; +import com.massivecraft.factions.entity.MConf; import com.massivecraft.factions.event.FactionsEventMembershipChange; import com.massivecraft.factions.event.FactionsEventMembershipChange.MembershipChangeReason; import com.massivecraft.mcore.cmd.req.ReqHasPerm; @@ -69,9 +70,9 @@ public class CmdFactionsKick extends FCommand fme.msg("You kicked %s from the faction %s!", fplayer.describeTo(fme), fplayerFaction.describeTo(fme)); } - if (ConfServer.logFactionKick) + if (MConf.get().logFactionKick) { - Factions.get().log((senderIsConsole ? "A console command" : fme.getName())+" kicked "+fplayer.getName()+" from the faction: "+fplayerFaction.getTag()); + Factions.get().log(fme.getDisplayName() + " kicked " + fplayer.getName() + " from the faction " + fplayerFaction.getTag()); } // Apply diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyDeposit.java b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyDeposit.java index 8939a799..87284a08 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyDeposit.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyDeposit.java @@ -1,11 +1,11 @@ package com.massivecraft.factions.cmd; -import com.massivecraft.factions.ConfServer; import com.massivecraft.factions.Factions; import com.massivecraft.factions.Perm; import com.massivecraft.factions.cmd.arg.ARFaction; import com.massivecraft.factions.cmd.req.ReqBankCommandsEnabled; import com.massivecraft.factions.entity.Faction; +import com.massivecraft.factions.entity.MConf; import com.massivecraft.factions.integration.Econ; import com.massivecraft.mcore.cmd.arg.ARDouble; import com.massivecraft.mcore.cmd.req.ReqHasPerm; @@ -40,7 +40,7 @@ public class CmdFactionsMoneyDeposit extends FCommand boolean success = Econ.transferMoney(fme, fme, faction, amount); - if (success && ConfServer.logMoneyTransactions) + if (success && MConf.get().logMoneyTransactions) { Factions.get().log(ChatColor.stripColor(Txt.parse("%s deposited %s in the faction bank: %s", fme.getName(), Money.format(fme, amount), faction.describeTo(null)))); } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferFf.java b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferFf.java index cb6a8cb3..012a5405 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferFf.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferFf.java @@ -1,10 +1,10 @@ package com.massivecraft.factions.cmd; -import com.massivecraft.factions.ConfServer; import com.massivecraft.factions.Perm; import com.massivecraft.factions.cmd.arg.ARFaction; import com.massivecraft.factions.cmd.req.ReqBankCommandsEnabled; import com.massivecraft.factions.entity.Faction; +import com.massivecraft.factions.entity.MConf; import com.massivecraft.factions.Factions; import com.massivecraft.factions.integration.Econ; import com.massivecraft.mcore.cmd.arg.ARDouble; @@ -43,7 +43,7 @@ public class CmdFactionsMoneyTransferFf extends FCommand boolean success = Econ.transferMoney(fme, from, to, amount); - if (success && ConfServer.logMoneyTransactions) + if (success && MConf.get().logMoneyTransactions) { Factions.get().log(ChatColor.stripColor(Txt.parse("%s transferred %s from the faction \"%s\" to the faction \"%s\"", fme.getName(), Money.format(from, amount), from.describeTo(null), to.describeTo(null)))); } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferFp.java b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferFp.java index c11bfb1d..8014bcca 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferFp.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferFp.java @@ -1,12 +1,12 @@ package com.massivecraft.factions.cmd; -import com.massivecraft.factions.ConfServer; import com.massivecraft.factions.Perm; import com.massivecraft.factions.cmd.arg.ARFPlayer; import com.massivecraft.factions.cmd.arg.ARFaction; import com.massivecraft.factions.cmd.req.ReqBankCommandsEnabled; import com.massivecraft.factions.entity.FPlayer; import com.massivecraft.factions.entity.Faction; +import com.massivecraft.factions.entity.MConf; import com.massivecraft.factions.Factions; import com.massivecraft.factions.integration.Econ; import com.massivecraft.mcore.cmd.arg.ARDouble; @@ -45,7 +45,7 @@ public class CmdFactionsMoneyTransferFp extends FCommand boolean success = Econ.transferMoney(fme, from, to, amount); - if (success && ConfServer.logMoneyTransactions) + if (success && MConf.get().logMoneyTransactions) { Factions.get().log(ChatColor.stripColor(Txt.parse("%s transferred %s from the faction \"%s\" to the player \"%s\"", fme.getName(), Money.format(from, amount), from.describeTo(null), to.describeTo(null)))); } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferPf.java b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferPf.java index 0779fe45..4be31f55 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferPf.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyTransferPf.java @@ -1,12 +1,12 @@ package com.massivecraft.factions.cmd; -import com.massivecraft.factions.ConfServer; import com.massivecraft.factions.Perm; import com.massivecraft.factions.cmd.arg.ARFPlayer; import com.massivecraft.factions.cmd.arg.ARFaction; import com.massivecraft.factions.cmd.req.ReqBankCommandsEnabled; import com.massivecraft.factions.entity.FPlayer; import com.massivecraft.factions.entity.Faction; +import com.massivecraft.factions.entity.MConf; import com.massivecraft.factions.Factions; import com.massivecraft.factions.integration.Econ; import com.massivecraft.mcore.cmd.arg.ARDouble; @@ -45,7 +45,7 @@ public class CmdFactionsMoneyTransferPf extends FCommand boolean success = Econ.transferMoney(fme, from, to, amount); - if (success && ConfServer.logMoneyTransactions) + if (success && MConf.get().logMoneyTransactions) { Factions.get().log(ChatColor.stripColor(Txt.parse("%s transferred %s from the player \"%s\" to the faction \"%s\"", fme.getName(), Money.format(from, amount), from.describeTo(null), to.describeTo(null)))); } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyWithdraw.java b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyWithdraw.java index e2a61c89..9c97192b 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsMoneyWithdraw.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsMoneyWithdraw.java @@ -1,10 +1,10 @@ package com.massivecraft.factions.cmd; -import com.massivecraft.factions.ConfServer; import com.massivecraft.factions.Perm; import com.massivecraft.factions.cmd.arg.ARFaction; import com.massivecraft.factions.cmd.req.ReqBankCommandsEnabled; import com.massivecraft.factions.entity.Faction; +import com.massivecraft.factions.entity.MConf; import com.massivecraft.factions.Factions; import com.massivecraft.factions.integration.Econ; import com.massivecraft.mcore.cmd.arg.ARDouble; @@ -39,7 +39,7 @@ public class CmdFactionsMoneyWithdraw extends FCommand boolean success = Econ.transferMoney(fme, faction, fme, amount); - if (success && ConfServer.logMoneyTransactions) + if (success && MConf.get().logMoneyTransactions) { Factions.get().log(ChatColor.stripColor(Txt.parse("%s withdrew %s from the faction bank: %s", fme.getName(), Money.format(faction, amount), faction.describeTo(null)))); } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsUnclaim.java b/src/com/massivecraft/factions/cmd/CmdFactionsUnclaim.java index 01a7c93d..a4914f31 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsUnclaim.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsUnclaim.java @@ -3,6 +3,7 @@ package com.massivecraft.factions.cmd; import com.massivecraft.factions.ConfServer; import com.massivecraft.factions.entity.BoardColl; import com.massivecraft.factions.entity.Faction; +import com.massivecraft.factions.entity.MConf; import com.massivecraft.factions.event.FactionsEventLandUnclaim; import com.massivecraft.factions.integration.Econ; import com.massivecraft.factions.integration.SpoutFeatures; @@ -57,7 +58,7 @@ public class CmdFactionsUnclaim extends FCommand SpoutFeatures.updateTerritoryDisplayLoc(chunk); myFaction.msg("%s unclaimed some land.", fme.describeTo(myFaction, true)); - if (ConfServer.logLandUnclaims) + if (MConf.get().logLandUnclaims) { Factions.get().log(fme.getName()+" unclaimed land at ("+chunk.getChunkX()+","+chunk.getChunkZ()+") from the faction: "+otherFaction.getTag()); } diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsUnclaimall.java b/src/com/massivecraft/factions/cmd/CmdFactionsUnclaimall.java index 96f9fddb..20dd9775 100644 --- a/src/com/massivecraft/factions/cmd/CmdFactionsUnclaimall.java +++ b/src/com/massivecraft/factions/cmd/CmdFactionsUnclaimall.java @@ -6,6 +6,7 @@ import com.massivecraft.factions.Perm; import com.massivecraft.factions.Rel; import com.massivecraft.factions.cmd.req.ReqRoleIsAtLeast; import com.massivecraft.factions.entity.BoardColl; +import com.massivecraft.factions.entity.MConf; import com.massivecraft.factions.event.FactionsEventLandUnclaimAll; import com.massivecraft.factions.integration.Econ; import com.massivecraft.factions.integration.SpoutFeatures; @@ -52,7 +53,7 @@ public class CmdFactionsUnclaimall extends FCommand // TODO: Move this to a listener instead. SpoutFeatures.updateTerritoryDisplayLoc(null); - if (ConfServer.logLandUnclaims) + if (MConf.get().logLandUnclaims) { Factions.get().log(fme.getName()+" unclaimed everything for the faction: "+myFaction.getTag()); } diff --git a/src/com/massivecraft/factions/entity/FPlayer.java b/src/com/massivecraft/factions/entity/FPlayer.java index fc8bf28d..d8730a88 100644 --- a/src/com/massivecraft/factions/entity/FPlayer.java +++ b/src/com/massivecraft/factions/entity/FPlayer.java @@ -694,8 +694,10 @@ public class FPlayer extends SenderEntity implements EconomyParticipato fplayer.msg("%s left %s.", this.describeTo(fplayer, true), myFaction.describeTo(fplayer)); } - if (ConfServer.logFactionLeave) + if (MConf.get().logFactionLeave) + { Factions.get().log(this.getName()+" left the faction: "+myFaction.getTag()); + } } this.resetFactionData(); @@ -709,8 +711,10 @@ public class FPlayer extends SenderEntity implements EconomyParticipato } myFaction.detach(); - if (ConfServer.logFactionDisband) + if (MConf.get().logFactionDisband) + { Factions.get().log("The faction "+myFaction.getTag()+" ("+myFaction.getId()+") was disbanded due to the last player ("+this.getName()+") leaving."); + } } } @@ -840,8 +844,10 @@ public class FPlayer extends SenderEntity implements EconomyParticipato BoardColl.get().setFactionAt(psChunk, forFaction); SpoutFeatures.updateTerritoryDisplayLoc(psChunk); - if (ConfServer.logLandClaims) + if (MConf.get().logLandClaims) + { Factions.get().log(this.getName()+" claimed land at ("+psChunk.getChunkX()+","+psChunk.getChunkZ()+") for the faction: "+forFaction.getTag()); + } return true; } diff --git a/src/com/massivecraft/factions/entity/FPlayerColl.java b/src/com/massivecraft/factions/entity/FPlayerColl.java index b07593b2..54177b60 100644 --- a/src/com/massivecraft/factions/entity/FPlayerColl.java +++ b/src/com/massivecraft/factions/entity/FPlayerColl.java @@ -130,7 +130,7 @@ public class FPlayerColl extends SenderColl if (fplayer.isOnline()) continue; if (now - lastPlayed <= toleranceMillis) continue; - if (ConfServer.logFactionLeave || ConfServer.logFactionKick) + if (MConf.get().logFactionLeave || MConf.get().logFactionKick) { Factions.get().log("Player "+fplayer.getName()+" was auto-removed due to inactivity."); } diff --git a/src/com/massivecraft/factions/entity/Faction.java b/src/com/massivecraft/factions/entity/Faction.java index a96336f8..074de2f2 100644 --- a/src/com/massivecraft/factions/entity/Faction.java +++ b/src/com/massivecraft/factions/entity/Faction.java @@ -851,7 +851,7 @@ public class Faction extends Entity implements EconomyParticipator } // no members left and faction isn't permanent, so disband it - if (ConfServer.logFactionDisband) + if (MConf.get().logFactionDisband) { Factions.get().log("The faction "+this.getTag()+" ("+this.getId()+") has been disbanded since it has no members left."); } diff --git a/src/com/massivecraft/factions/entity/MConf.java b/src/com/massivecraft/factions/entity/MConf.java index 54bbc754..5d28683a 100644 --- a/src/com/massivecraft/factions/entity/MConf.java +++ b/src/com/massivecraft/factions/entity/MConf.java @@ -78,5 +78,28 @@ public class MConf extends Entity public boolean herochatAlliesMuted = false; public Set herochatAlliesWorlds = new HashSet(); + // -------------------------------------------- // + // LOGGING + // -------------------------------------------- // + + public boolean logFactionCreate = true; + public boolean logFactionDisband = true; + public boolean logFactionJoin = true; + public boolean logFactionKick = true; + public boolean logFactionLeave = true; + public boolean logLandClaims = true; + public boolean logLandUnclaims = true; + public boolean logMoneyTransactions = true; + public boolean logPlayerCommands = true; + + // -------------------------------------------- // + // EXPLOITS + // -------------------------------------------- // + + public boolean handleExploitObsidianGenerators = true; + public boolean handleExploitEnderPearlClipping = true; + public boolean handleExploitInteractionSpam = true; + public boolean handleExploitTNTWaterlog = false; + } \ No newline at end of file diff --git a/src/com/massivecraft/factions/integration/LWCFeatures.java b/src/com/massivecraft/factions/integration/LWCFeatures.java index 590f06fc..bcfa2e0c 100644 --- a/src/com/massivecraft/factions/integration/LWCFeatures.java +++ b/src/com/massivecraft/factions/integration/LWCFeatures.java @@ -13,7 +13,6 @@ import org.bukkit.block.BlockState; import com.griefcraft.lwc.LWC; import com.griefcraft.lwc.LWCPlugin; import com.griefcraft.model.Protection; -import com.massivecraft.factions.ConfServer; import com.massivecraft.factions.Factions; import com.massivecraft.factions.entity.FPlayer; import com.massivecraft.factions.entity.Faction; @@ -29,14 +28,13 @@ public class LWCFeatures if(test == null || !test.isEnabled()) return; lwc = ((LWCPlugin)test).getLWC(); - Factions.get().log("Successfully hooked into LWC!"+(ConfServer.lwcIntegration ? "" : " Integration is currently disabled, though (\"lwcIntegration\").")); + Factions.get().log("Successfully hooked into LWC!"); } public static boolean getEnabled() { - return ConfServer.lwcIntegration && lwc != null; + return lwc != null; } - public static void clearAllProtections(PS chunkPs) { diff --git a/src/com/massivecraft/factions/listeners/FactionsListenerExploit.java b/src/com/massivecraft/factions/listeners/FactionsListenerExploit.java index c61970cb..fd64f6bf 100644 --- a/src/com/massivecraft/factions/listeners/FactionsListenerExploit.java +++ b/src/com/massivecraft/factions/listeners/FactionsListenerExploit.java @@ -20,8 +20,8 @@ import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.Material; -import com.massivecraft.factions.ConfServer; import com.massivecraft.factions.Factions; +import com.massivecraft.factions.entity.MConf; import com.massivecraft.mcore.util.SenderUtil; import com.massivecraft.mcore.util.Txt; @@ -52,7 +52,7 @@ public class FactionsListenerExploit implements Listener @EventHandler(priority = EventPriority.LOW, ignoreCancelled = true) public void interactSpam(PlayerInteractEvent event) { - if (!ConfServer.handleExploitInteractionSpam) return; + if (!MConf.get().handleExploitInteractionSpam) return; Player player = event.getPlayer(); String playerId = SenderUtil.getSenderId(player); @@ -99,7 +99,7 @@ public class FactionsListenerExploit implements Listener @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) public void obsidianGenerators(BlockFromToEvent event) { - if (!ConfServer.handleExploitObsidianGenerators) return; + if (!MConf.get().handleExploitObsidianGenerators) return; // thanks to ObGenBlocker and WorldGuard for this method Block block = event.getToBlock(); @@ -118,7 +118,7 @@ public class FactionsListenerExploit implements Listener @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) public void enderPearlClipping(PlayerTeleportEvent event) { - if (!ConfServer.handleExploitEnderPearlClipping) return; + if (!MConf.get().handleExploitEnderPearlClipping) return; if (event.getCause() != PlayerTeleportEvent.TeleportCause.ENDER_PEARL) return; // this exploit works when the target location is within 0.31 blocks or so of a door or glass block or similar... @@ -164,7 +164,7 @@ public class FactionsListenerExploit implements Listener @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) public void tntWaterlog(EntityExplodeEvent event) { - if (!ConfServer.handleExploitEnderPearlClipping) return; + if (!MConf.get().handleExploitEnderPearlClipping) return; if (!(event.getEntity() instanceof TNTPrimed)) return; Block center = event.getLocation().getBlock();