diff --git a/src/com/cnaude/chairs/ChairsCommand.java b/src/com/cnaude/chairs/commands/ChairsCommand.java similarity index 94% rename from src/com/cnaude/chairs/ChairsCommand.java rename to src/com/cnaude/chairs/commands/ChairsCommand.java index f1b0538..a2dd920 100644 --- a/src/com/cnaude/chairs/ChairsCommand.java +++ b/src/com/cnaude/chairs/commands/ChairsCommand.java @@ -2,13 +2,15 @@ * To change this template, choose Tools | Templates * and open the template in the editor. */ -package com.cnaude.chairs; +package com.cnaude.chairs.commands; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; +import com.cnaude.chairs.core.Chairs; + /** * * @author cnaude diff --git a/src/com/cnaude/chairs/ChairsIgnoreList.java b/src/com/cnaude/chairs/commands/ChairsIgnoreList.java similarity index 93% rename from src/com/cnaude/chairs/ChairsIgnoreList.java rename to src/com/cnaude/chairs/commands/ChairsIgnoreList.java index 7ecc657..257eed4 100644 --- a/src/com/cnaude/chairs/ChairsIgnoreList.java +++ b/src/com/cnaude/chairs/commands/ChairsIgnoreList.java @@ -2,11 +2,13 @@ * To change this template, choose Tools | Templates * and open the template in the editor. */ -package com.cnaude.chairs; +package com.cnaude.chairs.commands; import java.io.*; import java.util.ArrayList; +import com.cnaude.chairs.core.Chairs; + /** * * @author cnaude diff --git a/src/com/cnaude/chairs/ChairBlock.java b/src/com/cnaude/chairs/core/ChairBlock.java similarity index 88% rename from src/com/cnaude/chairs/ChairBlock.java rename to src/com/cnaude/chairs/core/ChairBlock.java index 6dab811..c17ae3d 100644 --- a/src/com/cnaude/chairs/ChairBlock.java +++ b/src/com/cnaude/chairs/core/ChairBlock.java @@ -2,7 +2,7 @@ * To change this template, choose Tools | Templates * and open the template in the editor. */ -package com.cnaude.chairs; +package com.cnaude.chairs.core; import org.bukkit.Material; diff --git a/src/com/cnaude/chairs/Chairs.java b/src/com/cnaude/chairs/core/Chairs.java similarity index 94% rename from src/com/cnaude/chairs/Chairs.java rename to src/com/cnaude/chairs/core/Chairs.java index be982e4..44ff7b0 100644 --- a/src/com/cnaude/chairs/Chairs.java +++ b/src/com/cnaude/chairs/core/Chairs.java @@ -1,4 +1,4 @@ -package com.cnaude.chairs; +package com.cnaude.chairs.core; import java.io.File; import java.lang.reflect.Method; @@ -19,6 +19,14 @@ import org.bukkit.entity.Player; import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.util.Vector; +import com.cnaude.chairs.commands.ChairsCommand; +import com.cnaude.chairs.commands.ChairsIgnoreList; +import com.cnaude.chairs.listeners.TrySitEventListener; +import com.cnaude.chairs.listeners.TryUnsitEventListener; +import com.cnaude.chairs.sitaddons.ChairEffects; +import com.cnaude.chairs.sitaddons.CommandRestrict; +import com.cnaude.chairs.vehiclearrow.GenVehicleArrowClass; + public class Chairs extends JavaPlugin { public ChairEffects chairEffects; public List allowedBlocks; @@ -42,7 +50,7 @@ public class Chairs extends JavaPlugin { private PlayerSitData psitdata; - protected PlayerSitData getPlayerSitData() + public PlayerSitData getPlayerSitData() { return psitdata; } diff --git a/src/com/cnaude/chairs/PlayerSitData.java b/src/com/cnaude/chairs/core/PlayerSitData.java similarity index 90% rename from src/com/cnaude/chairs/PlayerSitData.java rename to src/com/cnaude/chairs/core/PlayerSitData.java index 2a81900..fd340f1 100644 --- a/src/com/cnaude/chairs/PlayerSitData.java +++ b/src/com/cnaude/chairs/core/PlayerSitData.java @@ -1,4 +1,4 @@ -package com.cnaude.chairs; +package com.cnaude.chairs.core; import java.lang.reflect.Constructor; import java.lang.reflect.Field; @@ -25,11 +25,11 @@ public class PlayerSitData { private HashMap sitblockbr = new HashMap(); private HashMap sitstopteleportloc = new HashMap(); private HashMap sittask = new HashMap(); - protected boolean isSitting(Player player) + public boolean isSitting(Player player) { return sit.containsKey(player.getName()); } - protected boolean isAroowOccupied(Entity entity) + public boolean isAroowOccupied(Entity entity) { for (Entity usedentity : sit.values()) { @@ -40,15 +40,15 @@ public class PlayerSitData { } return false; } - protected boolean isBlockOccupied(Block block) + public boolean isBlockOccupied(Block block) { return sitblock.containsKey(block); } - protected Player getPlayerOnChair(Block chair) + public Player getPlayerOnChair(Block chair) { return Bukkit.getPlayerExact(sitblock.get(chair)); } - protected void sitPlayer(Player player, Location sitlocation) + public void sitPlayer(Player player, Location sitlocation) { try { if (plugin.notifyplayer) @@ -68,7 +68,7 @@ public class PlayerSitData { e.printStackTrace(); } } - protected void startReSitTask(final Player player) + public void startReSitTask(final Player player) { int task = Bukkit.getScheduler().scheduleSyncRepeatingTask(plugin, new Runnable() @@ -80,7 +80,7 @@ public class PlayerSitData { },1000,1000); sittask.put(player.getName(), task); } - protected void reSitPlayer(final Player player) + public void reSitPlayer(final Player player) { try { final Entity prevarrow = sit.get(player.getName()); @@ -116,7 +116,7 @@ public class PlayerSitData { arrow.setPassenger(player); return arrow; } - protected void unSitPlayer(final Player player, boolean restoreposition, boolean correctleaveposition) + public void unSitPlayer(final Player player, boolean restoreposition, boolean correctleaveposition) { final Entity arrow = sit.get(player.getName()); sit.remove(player.getName()); diff --git a/src/com/cnaude/chairs/TrySitEventListener.java b/src/com/cnaude/chairs/listeners/TrySitEventListener.java similarity index 98% rename from src/com/cnaude/chairs/TrySitEventListener.java rename to src/com/cnaude/chairs/listeners/TrySitEventListener.java index 8f59735..ab53f44 100644 --- a/src/com/cnaude/chairs/TrySitEventListener.java +++ b/src/com/cnaude/chairs/listeners/TrySitEventListener.java @@ -1,4 +1,4 @@ -package com.cnaude.chairs; +package com.cnaude.chairs.listeners; import org.bukkit.Location; import org.bukkit.Material; @@ -15,6 +15,11 @@ import org.bukkit.material.Stairs; import org.bukkit.material.Step; import org.bukkit.material.WoodenStep; +import com.cnaude.chairs.commands.ChairsIgnoreList; +import com.cnaude.chairs.core.ChairBlock; +import com.cnaude.chairs.core.Chairs; +import com.cnaude.chairs.pluginhooks.WGHook; + public class TrySitEventListener implements Listener { public Chairs plugin; diff --git a/src/com/cnaude/chairs/TryUnsitEventListener.java b/src/com/cnaude/chairs/listeners/TryUnsitEventListener.java similarity index 97% rename from src/com/cnaude/chairs/TryUnsitEventListener.java rename to src/com/cnaude/chairs/listeners/TryUnsitEventListener.java index 3867688..71329d0 100644 --- a/src/com/cnaude/chairs/TryUnsitEventListener.java +++ b/src/com/cnaude/chairs/listeners/TryUnsitEventListener.java @@ -1,4 +1,4 @@ -package com.cnaude.chairs; +package com.cnaude.chairs.listeners; import java.util.HashSet; @@ -14,6 +14,8 @@ import org.bukkit.event.player.PlayerQuitEvent; import org.bukkit.event.player.PlayerTeleportEvent; import org.bukkit.event.vehicle.VehicleExitEvent; +import com.cnaude.chairs.core.Chairs; + public class TryUnsitEventListener implements Listener { public Chairs plugin; diff --git a/src/com/cnaude/chairs/WGHook.java b/src/com/cnaude/chairs/pluginhooks/WGHook.java similarity index 94% rename from src/com/cnaude/chairs/WGHook.java rename to src/com/cnaude/chairs/pluginhooks/WGHook.java index 5e547c7..120592c 100644 --- a/src/com/cnaude/chairs/WGHook.java +++ b/src/com/cnaude/chairs/pluginhooks/WGHook.java @@ -1,4 +1,4 @@ -package com.cnaude.chairs; +package com.cnaude.chairs.pluginhooks; import java.util.HashSet; import java.util.List; diff --git a/src/com/cnaude/chairs/ChairEffects.java b/src/com/cnaude/chairs/sitaddons/ChairEffects.java similarity index 94% rename from src/com/cnaude/chairs/ChairEffects.java rename to src/com/cnaude/chairs/sitaddons/ChairEffects.java index a3c2157..c41c80d 100644 --- a/src/com/cnaude/chairs/ChairEffects.java +++ b/src/com/cnaude/chairs/sitaddons/ChairEffects.java @@ -2,7 +2,7 @@ * To change this template, choose Tools | Templates * and open the template in the editor. */ -package com.cnaude.chairs; +package com.cnaude.chairs.sitaddons; import org.bukkit.Bukkit; import org.bukkit.entity.Entity; @@ -10,6 +10,8 @@ import org.bukkit.entity.Item; import org.bukkit.entity.Player; import org.bukkit.event.player.PlayerPickupItemEvent; +import com.cnaude.chairs.core.Chairs; + /** * * @author cnaude diff --git a/src/com/cnaude/chairs/CommandRestrict.java b/src/com/cnaude/chairs/sitaddons/CommandRestrict.java similarity index 94% rename from src/com/cnaude/chairs/CommandRestrict.java rename to src/com/cnaude/chairs/sitaddons/CommandRestrict.java index acf6b42..364f038 100644 --- a/src/com/cnaude/chairs/CommandRestrict.java +++ b/src/com/cnaude/chairs/sitaddons/CommandRestrict.java @@ -1,4 +1,4 @@ -package com.cnaude.chairs; +package com.cnaude.chairs.sitaddons; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; @@ -6,6 +6,8 @@ import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerCommandPreprocessEvent; +import com.cnaude.chairs.core.Chairs; + public class CommandRestrict implements Listener { private Chairs plugin; diff --git a/src/com/cnaude/chairs/GenVehicleArrowClass.java b/src/com/cnaude/chairs/vehiclearrow/GenVehicleArrowClass.java similarity index 97% rename from src/com/cnaude/chairs/GenVehicleArrowClass.java rename to src/com/cnaude/chairs/vehiclearrow/GenVehicleArrowClass.java index 5bd9389..58c1550 100644 --- a/src/com/cnaude/chairs/GenVehicleArrowClass.java +++ b/src/com/cnaude/chairs/vehiclearrow/GenVehicleArrowClass.java @@ -1,4 +1,4 @@ -package com.cnaude.chairs; +package com.cnaude.chairs.vehiclearrow; import java.io.IOException;