From c89ee61b34e0fa727c5e4c34b9e302c39225f2ba Mon Sep 17 00:00:00 2001 From: Magnus Ulf Date: Thu, 24 Jan 2019 11:22:39 +0100 Subject: [PATCH] Remove more unimportant configuration options --- .../factions/cmd/CmdFactionsXPlaceholder.java | 43 ---------------- .../factions/engine/EngineChat.java | 1 + .../factions/engine/EngineSeeChunk.java | 15 +++--- .../massivecraft/factions/entity/Faction.java | 5 -- .../massivecraft/factions/entity/MConf.java | 51 +------------------ 5 files changed, 9 insertions(+), 106 deletions(-) delete mode 100644 src/com/massivecraft/factions/cmd/CmdFactionsXPlaceholder.java diff --git a/src/com/massivecraft/factions/cmd/CmdFactionsXPlaceholder.java b/src/com/massivecraft/factions/cmd/CmdFactionsXPlaceholder.java deleted file mode 100644 index cf96daac..00000000 --- a/src/com/massivecraft/factions/cmd/CmdFactionsXPlaceholder.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.massivecraft.factions.cmd; - -public class CmdFactionsXPlaceholder extends FactionsCommand -{ - // -------------------------------------------- // - // FIELDS - // -------------------------------------------- // - - public String extensionName; - - // -------------------------------------------- // - // CONSTRUCT - // -------------------------------------------- // - - public CmdFactionsXPlaceholder(String extensionName, String... aliases) - { - // Fields - this.extensionName = extensionName; - this.setSetupEnabled(false); - - // Aliases - this.addAliases(aliases); - - // Desc - this.setDesc("Use " + extensionName); - - // Parameters - this.setOverflowSensitive(false); - } - - // -------------------------------------------- // - // OVERRIDE - // -------------------------------------------- // - - @Override - public void perform() - { - msg("The extension %s isn't installed.", this.extensionName); - msg("Learn more and download the extension here:"); - msg("https://www.massivecraft.com/%s", this.extensionName.toLowerCase()); - } - -} diff --git a/src/com/massivecraft/factions/engine/EngineChat.java b/src/com/massivecraft/factions/engine/EngineChat.java index 9af43b27..dcb3ebf7 100644 --- a/src/com/massivecraft/factions/engine/EngineChat.java +++ b/src/com/massivecraft/factions/engine/EngineChat.java @@ -39,6 +39,7 @@ public class EngineChat extends Engine if (MConf.get().chatSetFormat) { + Bukkit.getPluginManager().registerEvent(AsyncPlayerChatEvent.class, this, MConf.get().chatSetFormatAt, new SetFormatEventExecutor(), Factions.get(), true); } diff --git a/src/com/massivecraft/factions/engine/EngineSeeChunk.java b/src/com/massivecraft/factions/engine/EngineSeeChunk.java index e505be30..989b0f9a 100644 --- a/src/com/massivecraft/factions/engine/EngineSeeChunk.java +++ b/src/com/massivecraft/factions/engine/EngineSeeChunk.java @@ -1,6 +1,5 @@ package com.massivecraft.factions.engine; -import com.massivecraft.factions.entity.MConf; import com.massivecraft.factions.entity.MPlayer; import com.massivecraft.massivecore.Engine; import com.massivecraft.massivecore.event.EventMassiveCorePlayerLeave; @@ -67,22 +66,22 @@ public class EngineSeeChunk extends Engine { // Do we have a new period? final long now = System.currentTimeMillis(); - final long length = MConf.get().seeChunkPeriodMillis; + final long length = 500; if ( ! PeriodUtil.isNewPeriod(this, length, now)) return; // Get the period number final long period = PeriodUtil.getPeriod(length, now); // Calculate the "step" from the period number - final int steps = MConf.get().seeChunkSteps; // Example: 4 + final int steps = 1; // Example: 4 final int step = (int) (period % steps); // Example: 0, 1, 2, 3 // Load other related config options final float offsetX = 0.0f; - final float offsetY = MConf.get().seeChunkParticleOffsetY; + final float offsetY = 2; final float offsetZ = 0.0f; final float speed = 0; - final int amount = MConf.get().seeChunkParticleAmount; + final int amount = 30; // For each player for (Player player : MUtil.getOnlinePlayers()) @@ -120,14 +119,14 @@ public class EngineSeeChunk extends Engine final int xmin = chunk.getChunkX() * 16; final int xmax = xmin + 15; - final double y = location.getBlockY() + MConf.get().seeChunkParticleDeltaY; + final double y = location.getBlockY() + 2; final int zmin = chunk.getChunkZ() * 16; final int zmax = zmin + 15; - int keepEvery = MConf.get().seeChunkKeepEvery; + int keepEvery = 5; if (keepEvery <= 0) keepEvery = Integer.MAX_VALUE; - int skipEvery = MConf.get().seeChunkSkipEvery; + int skipEvery = 0; if (skipEvery <= 0) skipEvery = Integer.MAX_VALUE; int x = xmin; diff --git a/src/com/massivecraft/factions/entity/Faction.java b/src/com/massivecraft/factions/entity/Faction.java index c28a1508..eb05e5a0 100644 --- a/src/com/massivecraft/factions/entity/Faction.java +++ b/src/com/massivecraft/factions/entity/Faction.java @@ -189,11 +189,6 @@ public class Faction extends Entity implements FactionsParticipator, MP { String ret = this.name; - if (MConf.get().factionNameForceUpperCase) - { - ret = ret.toUpperCase(); - } - return ret; } diff --git a/src/com/massivecraft/factions/entity/MConf.java b/src/com/massivecraft/factions/entity/MConf.java index 26d64555..1ec0c2c1 100644 --- a/src/com/massivecraft/factions/entity/MConf.java +++ b/src/com/massivecraft/factions/entity/MConf.java @@ -96,7 +96,6 @@ public class MConf extends Entity // Define the time in minutes between certain Factions system tasks is ran. public double taskPlayerPowerUpdateMinutes = 1; - public double taskPlayerDataRemoveMinutes = 5; public double taskEconLandRewardMinutes = 20; // -------------------------------------------- // @@ -187,12 +186,7 @@ public class MConf extends Entity // Limit the length of faction names here. public int factionNameLengthMin = 3; public int factionNameLengthMax = 16; - - // Should faction names automatically be converted to upper case? - // You probably don't want this feature. - // It's a remnant from old faction versions. - public boolean factionNameForceUpperCase = false; - + // -------------------------------------------- // // SET LIMITS // -------------------------------------------- // @@ -276,19 +270,6 @@ public class MConf extends Entity // Choose between: LOWEST, LOW, NORMAL, HIGH, HIGHEST and MONITOR. public EventPriority homesTeleportToOnDeathPriority = EventPriority.NORMAL; - // -------------------------------------------- // - // PERMS - // -------------------------------------------- // - - /*public List defaultPermsEnemy = MUtil.list(MPerm.ID_DEPOSIT); - public List defaultPermsNeutral = MUtil.list(MPerm.ID_DEPOSIT); - public List defaultPermsTruce = MUtil.list(MPerm.ID_DEPOSIT); - public List defaultPermsAlly = MUtil.list(MPerm.ID_DOOR, MPerm.ID_BUTTON, MPerm.ID_LEVER, MPerm.ID_HOME, MPerm.ID_CLAIMNEAR); - public List defaultPermsRecruit = MUtil.list(MPerm.ID_DOOR, MPerm.ID_BUTTON, MPerm.ID_LEVER, MPerm.ID_LEVER, MPerm.ID_HOME, MPerm.ID_CLAIMNEAR); - public List defaultPermsMember = MUtil.list(MPerm.ID_BUILD, MPerm.ID_DOOR, MPerm.ID_BUTTON, MPerm.ID_LEVER, MPerm.ID_LEVER, MPerm.ID_CONTAINER, MPerm.ID_HOME, MPerm.ID_CLAIMNEAR); - public List defaultPermsOfficer = MUtil.list(MPerm.ID_BUILD, MPerm.ID_DOOR, MPerm.ID_BUTTON, MPerm.ID_LEVER, MPerm.ID_LEVER, MPerm.ID_CONTAINER, MPerm.ID_DESC, MPerm.ID_MOTD, MPerm.ID_INVITE, MPerm.ID_KICK, MPerm.ID_RANK, MPerm.ID_TITLE, MPerm.ID_HOME, MPerm.ID_SETHOME, MPerm.ID_TERRITORY, MPerm.ID_ACCESS, MPerm.ID_CLAIMNEAR, MPerm.ID_REL); - public List defaultPermsLeader = MUtil.list(MPerm.ID_BUILD, MPerm.ID_DOOR, MPerm.ID_BUTTON, MPerm.ID_LEVER, MPerm.ID_LEVER, MPerm.ID_CONTAINER, MPerm.ID_NAME, MPerm.ID_DESC, MPerm.ID_MOTD, MPerm.ID_INVITE, MPerm.ID_KICK, MPerm.ID_RANK, MPerm.ID_TITLE, MPerm.ID_HOME, MPerm.ID_SETHOME, MPerm.ID_WITHDRAW, MPerm.ID_TERRITORY, MPerm.ID_ACCESS, MPerm.ID_CLAIMNEAR, MPerm.ID_REL, MPerm.ID_DISBAND, MPerm.ID_FLAGS, MPerm.ID_FLAGS);*/ - // -------------------------------------------- // // TERRITORY INFO // -------------------------------------------- // @@ -473,17 +454,7 @@ public class MConf extends Entity // This one is for example applied to WarZone since that faction has the friendly fire flag set to true. public ChatColor colorFriendlyFire = ChatColor.DARK_RED; - - // -------------------------------------------- // - // PREFIXES - // -------------------------------------------- // - // Here you may edit the name prefixes associated with different faction ranks. - public String prefixLeader = "**"; - public String prefixOfficer = "*"; - public String prefixMember = "+"; - public String prefixRecruit = "-"; - // -------------------------------------------- // // EXPLOITS // -------------------------------------------- // @@ -492,26 +463,6 @@ public class MConf extends Entity public boolean handleExploitEnderPearlClipping = true; public boolean handleNetherPortalTrap = true; - // -------------------------------------------- // - // SEE CHUNK - // -------------------------------------------- // - - // These options can be used to tweak the "/f seechunk" particle effect. - // They are fine as is but feel free to experiment with them if you want to. - - // Use 1 or multiple of 3, 4 or 5. - public int seeChunkSteps = 1; - - // White/Black List for creating sparse patterns. - public int seeChunkKeepEvery = 5; - public int seeChunkSkipEvery = 0; - - @EditorType(TypeMillisDiff.class) - public long seeChunkPeriodMillis = 500; - public int seeChunkParticleAmount = 30; - public float seeChunkParticleOffsetY = 2; - public float seeChunkParticleDeltaY = 2; - // -------------------------------------------- // // UNSTUCK // -------------------------------------------- //