diff --git a/src/com/sekwah/advancedportals/AdvancedPortalsCommand.java b/src/com/sekwah/advancedportals/AdvancedPortalsCommand.java index af3382d0..8153b3a1 100644 --- a/src/com/sekwah/advancedportals/AdvancedPortalsCommand.java +++ b/src/com/sekwah/advancedportals/AdvancedPortalsCommand.java @@ -1,6 +1,6 @@ package com.sekwah.advancedportals; -import com.sekwah.advancedportals.portalcontrolls.Portal; +import com.sekwah.advancedportals.portals.Portal; import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.World; diff --git a/src/com/sekwah/advancedportals/AdvancedPortalsPlugin.java b/src/com/sekwah/advancedportals/AdvancedPortalsPlugin.java index 1a9706fa..0de27c0a 100644 --- a/src/com/sekwah/advancedportals/AdvancedPortalsPlugin.java +++ b/src/com/sekwah/advancedportals/AdvancedPortalsPlugin.java @@ -4,7 +4,7 @@ import com.sekwah.advancedportals.DataCollector.DataCollector; import com.sekwah.advancedportals.compat.NMS; import com.sekwah.advancedportals.destinations.Destination; import com.sekwah.advancedportals.metrics.Metrics; -import com.sekwah.advancedportals.portalcontrolls.Portal; +import com.sekwah.advancedportals.portals.Portal; import org.bukkit.plugin.java.JavaPlugin; import java.io.IOException; diff --git a/src/com/sekwah/advancedportals/ConfigAccessor.java b/src/com/sekwah/advancedportals/ConfigAccessor.java index 2a437f0d..f6a1f564 100644 --- a/src/com/sekwah/advancedportals/ConfigAccessor.java +++ b/src/com/sekwah/advancedportals/ConfigAccessor.java @@ -18,8 +18,6 @@ public class ConfigAccessor { private FileConfiguration fileConfiguration; public ConfigAccessor(JavaPlugin plugin, String fileName) { - if (!plugin.isInitialized()) - throw new IllegalArgumentException("plugin must be initiaized"); this.plugin = plugin; this.fileName = fileName; } diff --git a/src/com/sekwah/advancedportals/FlowStopper.java b/src/com/sekwah/advancedportals/FlowStopper.java index 16f96341..c439e731 100644 --- a/src/com/sekwah/advancedportals/FlowStopper.java +++ b/src/com/sekwah/advancedportals/FlowStopper.java @@ -1,7 +1,7 @@ package com.sekwah.advancedportals; -import com.sekwah.advancedportals.portalcontrolls.AdvancedPortal; -import com.sekwah.advancedportals.portalcontrolls.Portal; +import com.sekwah.advancedportals.portals.AdvancedPortal; +import com.sekwah.advancedportals.portals.Portal; import org.bukkit.block.Block; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; diff --git a/src/com/sekwah/advancedportals/Listeners.java b/src/com/sekwah/advancedportals/Listeners.java index 53dc71d2..b1ab5900 100644 --- a/src/com/sekwah/advancedportals/Listeners.java +++ b/src/com/sekwah/advancedportals/Listeners.java @@ -1,8 +1,8 @@ package com.sekwah.advancedportals; import com.sekwah.advancedportals.events.WarpEvent; -import com.sekwah.advancedportals.portalcontrolls.AdvancedPortal; -import com.sekwah.advancedportals.portalcontrolls.Portal; +import com.sekwah.advancedportals.portals.AdvancedPortal; +import com.sekwah.advancedportals.portals.Portal; import org.bukkit.Bukkit; import org.bukkit.GameMode; import org.bukkit.Location; @@ -194,8 +194,6 @@ public class Listeners implements Listener { if((Portal.Portals[portalId].pos2.getX() - 3D) <= block.getX() && (Portal.Portals[portalId].pos2.getY() - 3D) <= block.getY() && (Portal.Portals[portalId].pos2.getZ() - 3D) <= block.getZ()){ player.sendMessage("\u00A7a[\u00A7eAdvancedPortals\u00A7a] You have selected: \u00A7e" + Portal.Portals[portalId].portalName); - // TODO add code somewhere so when a portal is removed or changed if someone has it selected it notifies them - // or removed their selections and tells them, maybe not before this update. player.removeMetadata("selectingPortal", plugin); player.setMetadata("selectedPortal", new FixedMetadataValue(plugin, Portal.Portals[portalId].portalName)); // adds the name to the metadata of the character event.setCancelled(true); diff --git a/src/com/sekwah/advancedportals/PortalProtect.java b/src/com/sekwah/advancedportals/PortalProtect.java index 11686984..701359ae 100644 --- a/src/com/sekwah/advancedportals/PortalProtect.java +++ b/src/com/sekwah/advancedportals/PortalProtect.java @@ -1,6 +1,6 @@ package com.sekwah.advancedportals; -import com.sekwah.advancedportals.portalcontrolls.Portal; +import com.sekwah.advancedportals.portals.Portal; import org.bukkit.block.Block; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; diff --git a/src/com/sekwah/advancedportals/portalcontrolls/AdvancedPortal.java b/src/com/sekwah/advancedportals/portals/AdvancedPortal.java similarity index 90% rename from src/com/sekwah/advancedportals/portalcontrolls/AdvancedPortal.java rename to src/com/sekwah/advancedportals/portals/AdvancedPortal.java index 90fd0053..ad930714 100644 --- a/src/com/sekwah/advancedportals/portalcontrolls/AdvancedPortal.java +++ b/src/com/sekwah/advancedportals/portals/AdvancedPortal.java @@ -1,4 +1,4 @@ -package com.sekwah.advancedportals.portalcontrolls; +package com.sekwah.advancedportals.portals; import org.bukkit.Location; import org.bukkit.Material; diff --git a/src/com/sekwah/advancedportals/portalcontrolls/Portal.java b/src/com/sekwah/advancedportals/portals/Portal.java similarity index 99% rename from src/com/sekwah/advancedportals/portalcontrolls/Portal.java rename to src/com/sekwah/advancedportals/portals/Portal.java index 790a8039..19dc14fe 100644 --- a/src/com/sekwah/advancedportals/portalcontrolls/Portal.java +++ b/src/com/sekwah/advancedportals/portals/Portal.java @@ -1,4 +1,4 @@ -package com.sekwah.advancedportals.portalcontrolls; +package com.sekwah.advancedportals.portals; import com.google.common.io.ByteArrayDataOutput; import com.google.common.io.ByteStreams; @@ -274,6 +274,8 @@ public class Portal { } } config.getConfig().set(name, null); + + // TODO add code to check if people have the portal selected and notify if removed. /**Set keys = config.getConfig().getKeys(true); for(String key: keys){