From e69c20be77360c97c846f39356760f050b98d046 Mon Sep 17 00:00:00 2001 From: alisolarflare Date: Wed, 30 Nov 2016 00:32:30 -0500 Subject: [PATCH] I'll look at the convo tomorrow, --- src/alisolarflare/AliPresents.java | 2 -- .../CreativeBoundariesComponent.java | 17 +++++------------ .../creativeboundaries/commands/Cbgm0.java | 15 ++------------- 3 files changed, 7 insertions(+), 27 deletions(-) diff --git a/src/alisolarflare/AliPresents.java b/src/alisolarflare/AliPresents.java index bc334b6..b135968 100644 --- a/src/alisolarflare/AliPresents.java +++ b/src/alisolarflare/AliPresents.java @@ -9,7 +9,6 @@ import org.bukkit.plugin.java.JavaPlugin; import alisolarflare.components.alilinks.AliLinkComponent; import alisolarflare.components.bankchest.BankChestComponent; import alisolarflare.components.creativeboundaries.CreativeBoundariesComponent; -import alisolarflare.components.easyuhc.EasyUHCComponent; import alisolarflare.components.flairdoor.FlairDoorComponent; import alisolarflare.components.gpowers.GPowerComponent; import alisolarflare.components.insurance.InsuranceComponent; @@ -28,7 +27,6 @@ public class AliPresents extends JavaPlugin{ new AliLinkComponent().register(this); new BankChestComponent().register(this); new CreativeBoundariesComponent().register(this); - new EasyUHCComponent().register(this); new FlairDoorComponent().register(this); new GPowerComponent().register(this); new InsuranceComponent().register(this); diff --git a/src/alisolarflare/components/creativeboundaries/CreativeBoundariesComponent.java b/src/alisolarflare/components/creativeboundaries/CreativeBoundariesComponent.java index 999036c..4c96ef3 100644 --- a/src/alisolarflare/components/creativeboundaries/CreativeBoundariesComponent.java +++ b/src/alisolarflare/components/creativeboundaries/CreativeBoundariesComponent.java @@ -1,28 +1,21 @@ package alisolarflare.components.creativeboundaries; -import java.util.ArrayList; -import java.util.List; - -import org.bukkit.entity.Player; import org.bukkit.plugin.java.JavaPlugin; import alisolarflare.architecture.Component; import alisolarflare.components.creativeboundaries.commands.Cbgm0; import alisolarflare.components.creativeboundaries.commands.Cbgm1; -import alisolarflare.components.creativeboundaries.commands.SetDickmode; +import alisolarflare.components.creativeboundaries.commands.SetForceBoundaries; import alisolarflare.components.creativeboundaries.listeners.PlotChangeListener; public class CreativeBoundariesComponent extends Component{ - public boolean dickmode; - public List cbCreatives = new ArrayList(); @Override public void register(JavaPlugin plugin) { - registerCommand(plugin, new Cbgm1(this)); - registerCommand(plugin, new Cbgm0(this)); - registerCommand(plugin, new SetDickmode(this)); - - registerListener(plugin, new PlotChangeListener(this)); + registerCommand(plugin, new Cbgm1()); + registerCommand(plugin, new Cbgm0()); + registerCommand(plugin, new SetForceBoundaries()); + registerListener(plugin, new PlotChangeListener()); //registerListener(plugin, new ItemRestrictionListener(this)); } diff --git a/src/alisolarflare/components/creativeboundaries/commands/Cbgm0.java b/src/alisolarflare/components/creativeboundaries/commands/Cbgm0.java index 7ef2fb8..106f1d6 100644 --- a/src/alisolarflare/components/creativeboundaries/commands/Cbgm0.java +++ b/src/alisolarflare/components/creativeboundaries/commands/Cbgm0.java @@ -1,25 +1,14 @@ package alisolarflare.components.creativeboundaries.commands; -import java.util.List; - -import org.bukkit.GameMode; import org.bukkit.entity.Player; import alisolarflare.architecture.commands.PlayerCommand; -import alisolarflare.components.creativeboundaries.CreativeBoundariesComponent; +import alisolarflare.components.creativeboundaries.CreativeBoundariesAPI; public class Cbgm0 extends PlayerCommand{ - - private List cbCreatives; - - public Cbgm0(CreativeBoundariesComponent component) { - this.cbCreatives = component.cbCreatives; - } - @Override public boolean OnCommand(Player player, String arg2, String[] arg3) { - player.setGameMode(GameMode.SURVIVAL); - cbCreatives.remove(player); + CreativeBoundariesAPI.toSurvival(player); return true; } public String[] GetHelpText(String alias){