MassiveCore - MassivePlugin and Active
This commit is contained in:
@@ -8,16 +8,15 @@ import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.player.AsyncPlayerChatEvent;
|
||||
import org.bukkit.plugin.EventExecutor;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
import com.massivecraft.factions.Factions;
|
||||
import com.massivecraft.factions.chat.ChatFormatter;
|
||||
import com.massivecraft.factions.entity.MConf;
|
||||
import com.massivecraft.massivecore.EngineAbstract;
|
||||
import com.massivecraft.massivecore.Engine;
|
||||
import com.massivecraft.massivecore.event.EventMassiveCorePlayerToRecipientChat;
|
||||
import com.massivecraft.massivecore.util.MUtil;
|
||||
|
||||
public class EngineChat extends EngineAbstract
|
||||
public class EngineChat extends Engine
|
||||
{
|
||||
// -------------------------------------------- //
|
||||
// INSTANCE & CONSTRUCT
|
||||
@@ -25,21 +24,19 @@ public class EngineChat extends EngineAbstract
|
||||
|
||||
private static EngineChat i = new EngineChat();
|
||||
public static EngineChat get() { return i; }
|
||||
public EngineChat()
|
||||
{
|
||||
this.setPlugin(Factions.get());
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// OVERRIDE
|
||||
// -------------------------------------------- //
|
||||
|
||||
@Override
|
||||
public Plugin getPlugin()
|
||||
public void setActiveInner(boolean active)
|
||||
{
|
||||
return Factions.get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void activate()
|
||||
{
|
||||
super.activate();
|
||||
if ( ! active) return;
|
||||
|
||||
if (MConf.get().chatSetFormat)
|
||||
{
|
||||
|
@@ -7,9 +7,9 @@ import java.util.Set;
|
||||
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
import com.massivecraft.factions.Factions;
|
||||
import com.massivecraft.factions.cmd.CmdFactions;
|
||||
import com.massivecraft.factions.entity.Faction;
|
||||
import com.massivecraft.factions.entity.MConf;
|
||||
import com.massivecraft.factions.entity.MPlayer;
|
||||
@@ -29,12 +29,12 @@ import com.massivecraft.factions.event.EventFactionsFlagChange;
|
||||
import com.massivecraft.factions.event.EventFactionsRelationChange;
|
||||
import com.massivecraft.factions.event.EventFactionsTitleChange;
|
||||
import com.massivecraft.factions.integration.Econ;
|
||||
import com.massivecraft.massivecore.EngineAbstract;
|
||||
import com.massivecraft.massivecore.Engine;
|
||||
import com.massivecraft.massivecore.money.Money;
|
||||
import com.massivecraft.massivecore.ps.PS;
|
||||
import com.massivecraft.massivecore.util.Txt;
|
||||
|
||||
public class EngineEcon extends EngineAbstract
|
||||
public class EngineEcon extends Engine
|
||||
{
|
||||
// -------------------------------------------- //
|
||||
// INSTANCE & CONSTRUCT
|
||||
@@ -42,17 +42,6 @@ public class EngineEcon extends EngineAbstract
|
||||
|
||||
private static EngineEcon i = new EngineEcon();
|
||||
public static EngineEcon get() { return i; }
|
||||
public EngineEcon() {}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// OVERRIDE
|
||||
// -------------------------------------------- //
|
||||
|
||||
@Override
|
||||
public Plugin getPlugin()
|
||||
{
|
||||
return Factions.get();
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// TAKE ON LEAVE
|
||||
@@ -180,7 +169,7 @@ public class EngineEcon extends EngineAbstract
|
||||
public void payForCommand(EventFactionsRelationChange event)
|
||||
{
|
||||
Double cost = MConf.get().econRelCost.get(event.getNewRelation());
|
||||
String desc = Factions.get().getOuterCmdFactions().cmdFactionsRelationNeutral.getDesc();
|
||||
String desc = CmdFactions.get().cmdFactionsRelationNeutral.getDesc();
|
||||
|
||||
payForAction(event, cost, desc);
|
||||
}
|
||||
@@ -189,7 +178,7 @@ public class EngineEcon extends EngineAbstract
|
||||
public void payForCommand(EventFactionsHomeChange event)
|
||||
{
|
||||
Double cost = MConf.get().econCostSethome;
|
||||
String desc = Factions.get().getOuterCmdFactions().cmdFactionsSethome.getDesc();
|
||||
String desc = CmdFactions.get().cmdFactionsSethome.getDesc();
|
||||
|
||||
payForAction(event, cost, desc);
|
||||
}
|
||||
@@ -198,7 +187,7 @@ public class EngineEcon extends EngineAbstract
|
||||
public void payForCommand(EventFactionsCreate event)
|
||||
{
|
||||
Double cost = MConf.get().econCostCreate;
|
||||
String desc = Factions.get().getOuterCmdFactions().cmdFactionsCreate.getDesc();
|
||||
String desc = CmdFactions.get().cmdFactionsCreate.getDesc();
|
||||
|
||||
payForAction(event, cost, desc);
|
||||
}
|
||||
@@ -207,7 +196,7 @@ public class EngineEcon extends EngineAbstract
|
||||
public void payForCommand(EventFactionsDescriptionChange event)
|
||||
{
|
||||
Double cost = MConf.get().econCostDescription;
|
||||
String desc = Factions.get().getOuterCmdFactions().cmdFactionsDescription.getDesc();
|
||||
String desc = CmdFactions.get().cmdFactionsDescription.getDesc();
|
||||
|
||||
payForAction(event, cost, desc);
|
||||
}
|
||||
@@ -216,7 +205,7 @@ public class EngineEcon extends EngineAbstract
|
||||
public void payForCommand(EventFactionsNameChange event)
|
||||
{
|
||||
Double cost = MConf.get().econCostName;
|
||||
String desc = Factions.get().getOuterCmdFactions().cmdFactionsName.getDesc();
|
||||
String desc = CmdFactions.get().cmdFactionsName.getDesc();
|
||||
|
||||
payForAction(event, cost, desc);
|
||||
}
|
||||
@@ -225,7 +214,7 @@ public class EngineEcon extends EngineAbstract
|
||||
public void payForCommand(EventFactionsTitleChange event)
|
||||
{
|
||||
Double cost = MConf.get().econCostTitle;
|
||||
String desc = Factions.get().getOuterCmdFactions().cmdFactionsTitle.getDesc();
|
||||
String desc = CmdFactions.get().cmdFactionsTitle.getDesc();
|
||||
|
||||
payForAction(event, cost, desc);
|
||||
}
|
||||
@@ -234,7 +223,7 @@ public class EngineEcon extends EngineAbstract
|
||||
public void payForCommand(EventFactionsFlagChange event)
|
||||
{
|
||||
Double cost = MConf.get().econCostFlag;
|
||||
String desc = Factions.get().getOuterCmdFactions().cmdFactionsFlag.getDesc();
|
||||
String desc = CmdFactions.get().cmdFactionsFlag.getDesc();
|
||||
|
||||
payForAction(event, cost, desc);
|
||||
}
|
||||
@@ -243,7 +232,7 @@ public class EngineEcon extends EngineAbstract
|
||||
public void payForCommand(EventFactionsInvitedChange event)
|
||||
{
|
||||
Double cost = event.isNewInvited() ? MConf.get().econCostInvite : MConf.get().econCostDeinvite;
|
||||
String desc = Factions.get().getOuterCmdFactions().cmdFactionsInvite.getDesc();
|
||||
String desc = CmdFactions.get().cmdFactionsInvite.getDesc();
|
||||
|
||||
payForAction(event, cost, desc);
|
||||
}
|
||||
@@ -252,7 +241,7 @@ public class EngineEcon extends EngineAbstract
|
||||
public void payForCommand(EventFactionsHomeTeleport event)
|
||||
{
|
||||
Double cost = MConf.get().econCostHome;
|
||||
String desc = Factions.get().getOuterCmdFactions().cmdFactionsHome.getDesc();
|
||||
String desc = CmdFactions.get().cmdFactionsHome.getDesc();
|
||||
|
||||
payForAction(event, cost, desc);
|
||||
}
|
||||
|
@@ -15,18 +15,16 @@ import org.bukkit.event.player.PlayerTeleportEvent;
|
||||
import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
|
||||
import com.massivecraft.factions.Factions;
|
||||
import com.massivecraft.factions.entity.MConf;
|
||||
import com.massivecraft.massivecore.EngineAbstract;
|
||||
import com.massivecraft.massivecore.Engine;
|
||||
import com.massivecraft.massivecore.ps.PS;
|
||||
import com.massivecraft.massivecore.util.MUtil;
|
||||
|
||||
|
||||
public class EngineExploit extends EngineAbstract
|
||||
public class EngineExploit extends Engine
|
||||
{
|
||||
// -------------------------------------------- //
|
||||
// INSTANCE & CONSTRUCT
|
||||
@@ -35,16 +33,6 @@ public class EngineExploit extends EngineAbstract
|
||||
private static EngineExploit i = new EngineExploit();
|
||||
public static EngineExploit get() { return i; }
|
||||
|
||||
// -------------------------------------------- //
|
||||
// OVERRIDE
|
||||
// -------------------------------------------- //
|
||||
|
||||
@Override
|
||||
public Plugin getPlugin()
|
||||
{
|
||||
return Factions.get();
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// OBSIDIAN GENERATORS
|
||||
// -------------------------------------------- //
|
||||
|
@@ -65,7 +65,6 @@ import org.bukkit.event.player.PlayerJoinEvent;
|
||||
import org.bukkit.event.player.PlayerKickEvent;
|
||||
import org.bukkit.event.player.PlayerMoveEvent;
|
||||
import org.bukkit.event.player.PlayerRespawnEvent;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.projectiles.ProjectileSource;
|
||||
|
||||
import com.massivecraft.factions.Const;
|
||||
@@ -89,9 +88,9 @@ import com.massivecraft.factions.event.EventFactionsPowerChange;
|
||||
import com.massivecraft.factions.event.EventFactionsPowerChange.PowerChangeReason;
|
||||
import com.massivecraft.factions.event.EventFactionsPvpDisallowed;
|
||||
import com.massivecraft.factions.integration.Econ;
|
||||
import com.massivecraft.factions.spigot.SpigotFeatures;
|
||||
import com.massivecraft.factions.integration.spigot.IntegrationSpigot;
|
||||
import com.massivecraft.factions.util.VisualizeUtil;
|
||||
import com.massivecraft.massivecore.EngineAbstract;
|
||||
import com.massivecraft.massivecore.Engine;
|
||||
import com.massivecraft.massivecore.PriorityLines;
|
||||
import com.massivecraft.massivecore.collections.MassiveSet;
|
||||
import com.massivecraft.massivecore.event.EventMassiveCorePlayerLeave;
|
||||
@@ -104,7 +103,7 @@ import com.massivecraft.massivecore.util.TimeDiffUtil;
|
||||
import com.massivecraft.massivecore.util.TimeUnit;
|
||||
import com.massivecraft.massivecore.util.Txt;
|
||||
|
||||
public class EngineMain extends EngineAbstract
|
||||
public class EngineMain extends Engine
|
||||
{
|
||||
// -------------------------------------------- //
|
||||
// INSTANCE & CONSTRUCT
|
||||
@@ -112,17 +111,6 @@ public class EngineMain extends EngineAbstract
|
||||
|
||||
private static EngineMain i = new EngineMain();
|
||||
public static EngineMain get() { return i; }
|
||||
public EngineMain() {}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// OVERRIDE
|
||||
// -------------------------------------------- //
|
||||
|
||||
@Override
|
||||
public Plugin getPlugin()
|
||||
{
|
||||
return Factions.get();
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// CONSTANTS
|
||||
@@ -1462,7 +1450,7 @@ public class EngineMain extends EngineAbstract
|
||||
public void blockBuild(BlockPistonExtendEvent event)
|
||||
{
|
||||
// Is using Spigot or is checking deactivated by MConf?
|
||||
if (SpigotFeatures.isActive() || ! MConf.get().handlePistonProtectionThroughDenyBuild) return;
|
||||
if (IntegrationSpigot.get().isIntegrationActive() || ! MConf.get().handlePistonProtectionThroughDenyBuild) return;
|
||||
|
||||
Block block = event.getBlock();
|
||||
|
||||
@@ -1494,7 +1482,7 @@ public class EngineMain extends EngineAbstract
|
||||
public void blockBuild(BlockPistonRetractEvent event)
|
||||
{
|
||||
// Is using Spigot or is checking deactivated by MConf?
|
||||
if (SpigotFeatures.isActive() || ! MConf.get().handlePistonProtectionThroughDenyBuild) return;
|
||||
if (IntegrationSpigot.get().isIntegrationActive() || ! MConf.get().handlePistonProtectionThroughDenyBuild) return;
|
||||
|
||||
// If not a sticky piston, retraction should be fine
|
||||
if ( ! event.isSticky()) return;
|
||||
|
@@ -10,19 +10,16 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.player.PlayerChangedWorldEvent;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
import com.massivecraft.factions.Factions;
|
||||
import com.massivecraft.factions.entity.MConf;
|
||||
import com.massivecraft.factions.entity.MPlayer;
|
||||
import com.massivecraft.massivecore.EngineAbstract;
|
||||
import com.massivecraft.massivecore.Engine;
|
||||
import com.massivecraft.massivecore.event.EventMassiveCorePlayerLeave;
|
||||
import com.massivecraft.massivecore.particleeffect.ParticleEffect;
|
||||
import com.massivecraft.massivecore.ps.PS;
|
||||
import com.massivecraft.massivecore.util.MUtil;
|
||||
import com.massivecraft.massivecore.util.PeriodUtil;
|
||||
|
||||
public class EngineSeeChunk extends EngineAbstract
|
||||
public class EngineSeeChunk extends Engine
|
||||
{
|
||||
// -------------------------------------------- //
|
||||
// INSTANCE & CONSTRUCT
|
||||
@@ -30,22 +27,9 @@ public class EngineSeeChunk extends EngineAbstract
|
||||
|
||||
private static EngineSeeChunk i = new EngineSeeChunk();
|
||||
public static EngineSeeChunk get() { return i; }
|
||||
public EngineSeeChunk() {}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// OVERRIDE
|
||||
// -------------------------------------------- //
|
||||
|
||||
@Override
|
||||
public Plugin getPlugin()
|
||||
public EngineSeeChunk()
|
||||
{
|
||||
return Factions.get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getPeriod()
|
||||
{
|
||||
return 1L;
|
||||
this.setPeriod(1L);
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
|
Reference in New Issue
Block a user