Repackage everything
This commit is contained in:
parent
b5ceb814ae
commit
6205d80ae1
@ -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
|
@ -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
|
@ -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;
|
||||
|
@ -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<ChairBlock> allowedBlocks;
|
||||
@ -42,7 +50,7 @@ public class Chairs extends JavaPlugin {
|
||||
|
||||
|
||||
private PlayerSitData psitdata;
|
||||
protected PlayerSitData getPlayerSitData()
|
||||
public PlayerSitData getPlayerSitData()
|
||||
{
|
||||
return psitdata;
|
||||
}
|
@ -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<String, Block> sitblockbr = new HashMap<String, Block>();
|
||||
private HashMap<String, Location> sitstopteleportloc = new HashMap<String, Location>();
|
||||
private HashMap<String, Integer> sittask = new HashMap<String, Integer>();
|
||||
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());
|
@ -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;
|
@ -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;
|
@ -1,4 +1,4 @@
|
||||
package com.cnaude.chairs;
|
||||
package com.cnaude.chairs.pluginhooks;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
@ -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
|
@ -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;
|
@ -1,4 +1,4 @@
|
||||
package com.cnaude.chairs;
|
||||
package com.cnaude.chairs.vehiclearrow;
|
||||
|
||||
import java.io.IOException;
|
||||
|
Loading…
Reference in New Issue
Block a user