Remove more unimportant configuration options

This commit is contained in:
Magnus Ulf
2019-01-24 11:22:39 +01:00
parent 8d9392eb87
commit c89ee61b34
5 changed files with 9 additions and 106 deletions

View File

@@ -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);
}

View File

@@ -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;