Saber Factions Initiated

This commit is contained in:
Driftay
2019-06-28 21:49:46 -04:00
parent 1fd3220e5e
commit 2c5a501d0e
120 changed files with 676 additions and 743 deletions

View File

@@ -2,7 +2,7 @@ package com.massivecraft.factions.cmd;
import com.massivecraft.factions.FLocation;
import com.massivecraft.factions.SavageFactions;
import com.massivecraft.factions.SaberFactions;
import com.massivecraft.factions.struct.Permission;
import com.massivecraft.factions.util.Particles.ParticleEffect;
import com.massivecraft.factions.util.VisualizeUtil;
@@ -40,7 +40,7 @@ public class CmdSeeChunk extends FCommand {
this.useParticles = p.getConfig().getBoolean("see-chunk.particles", true);
interval = SavageFactions.plugin.getConfig().getLong("see-chunk.interval", 10L);
interval = SaberFactions.plugin.getConfig().getLong("see-chunk.interval", 10L);
if (effect == null) {
effect = ParticleEffect.REDSTONE;
}
@@ -71,7 +71,7 @@ public class CmdSeeChunk extends FCommand {
}
private void startTask() {
taskID = Bukkit.getScheduler().scheduleSyncRepeatingTask(SavageFactions.plugin, () -> {
taskID = Bukkit.getScheduler().scheduleSyncRepeatingTask(SaberFactions.plugin, () -> {
Iterator<String> itr = seeChunkMap.keySet().iterator();
while (itr.hasNext()) {
Object nameObject = itr.next();
@@ -117,10 +117,10 @@ public class CmdSeeChunk extends FCommand {
continue;
}
if (useParticles) {
if (SavageFactions.plugin.useNonPacketParticles) {
if (SaberFactions.plugin.useNonPacketParticles) {
// Dust options only exists in the 1.13 API, so we use an
// alternative method to achieve this in lower versions.
if (SavageFactions.plugin.mc113) {
if (SaberFactions.plugin.mc113) {
player.spawnParticle(Particle.REDSTONE, loc, 0, new Particle.DustOptions(Color.RED, 1));
} else {
player.getWorld().spawnParticle(Particle.REDSTONE, loc, 0, 255, 0, 0, 1);
@@ -132,7 +132,7 @@ public class CmdSeeChunk extends FCommand {
} else {
Material type = blockY % 5 == 0 ? SavageFactions.plugin.REDSTONE_LAMP_ON : SavageFactions.plugin.STAINED_GLASS;
Material type = blockY % 5 == 0 ? SaberFactions.plugin.REDSTONE_LAMP_ON : SaberFactions.plugin.STAINED_GLASS;
VisualizeUtil.addLocation(player, loc, type);
}
}