From 4b96a566c586dfd71f376ca97202c08cd3142ddc Mon Sep 17 00:00:00 2001 From: island219 Date: Fri, 22 Mar 2013 15:58:17 +0000 Subject: [PATCH 1/6] Added README.md --- README.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..5dcb952 --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +Secure-Chests +============= + +Allow users to lock chests, furnaces, potion stands, dispencers, and doors so others can't access them! As well we now have Simple Clans support! I made this plugin because I didn't like all the complicated command structure's and the selection method of the other plugins out there. so here it is! simple chest locking. + From 39337fb2942e8e88ed14432f3254a4f5bf0ae787 Mon Sep 17 00:00:00 2001 From: island219 Date: Fri, 22 Mar 2013 16:07:08 +0000 Subject: [PATCH 2/6] Initial move to an updated version of SimpleClans Update plugin with support for SimpleClans2 rather than SimpleClans1 --- Secure-Chests/src/me/HAklowner/SecureChests/SecureChests.java | 4 ++-- Secure-Chests/src/plugin.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Secure-Chests/src/me/HAklowner/SecureChests/SecureChests.java b/Secure-Chests/src/me/HAklowner/SecureChests/SecureChests.java index a4ef045..053a227 100644 --- a/Secure-Chests/src/me/HAklowner/SecureChests/SecureChests.java +++ b/Secure-Chests/src/me/HAklowner/SecureChests/SecureChests.java @@ -24,7 +24,7 @@ import me.HAklowner.SecureChests.Utils.Verblevel; import me.HAklowner.SecureChests.Utils.Vlevel; -import net.sacredlabyrinth.phaed.simpleclans.SimpleClans; +import net.sacredlabyrinth.phaed.simpleclans.SimpleClans2; import org.bukkit.ChatColor; import org.bukkit.command.CommandSender; @@ -304,7 +304,7 @@ public void onEnable() { registerCommands(); - Plugin plug = pm.getPlugin("SimpleClans"); + Plugin plug = pm.getPlugin("SimpleClans2"); if (plug instanceof SimpleClans) { diff --git a/Secure-Chests/src/plugin.yml b/Secure-Chests/src/plugin.yml index ad834ba..e755990 100644 --- a/Secure-Chests/src/plugin.yml +++ b/Secure-Chests/src/plugin.yml @@ -5,7 +5,7 @@ dev-url: http://dev.bukkit.org/server-mods/secure-chests/ author: HAklowner website: http://dev.bukkit.org/server-mods/secure-chests/ description: SecureChests - Simple chest locking! -softdepend: [SimpleClans, Vault, ChestShop] +softdepend: [SimpleClans2, Vault, ChestShop] commands: lock: description: lock your chests From 2b069064292ee0d4edfe824faebd1bc879ea8bee Mon Sep 17 00:00:00 2001 From: island219 Date: Fri, 22 Mar 2013 16:09:04 +0000 Subject: [PATCH 3/6] Default Access to /sc lock and /sc changeowner --- Secure-Chests/src/plugin.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Secure-Chests/src/plugin.yml b/Secure-Chests/src/plugin.yml index e755990..aacef02 100644 --- a/Secure-Chests/src/plugin.yml +++ b/Secure-Chests/src/plugin.yml @@ -64,8 +64,10 @@ permissions: description: Allows you to use the "/sc purge" command securechests.lock: description: Allows you lock allowed blocks. + default: true securechests.lock.transfer: description: Allows you to use /sc chagneowner on your own chests. + default: true securechests.bypass.lock: description: Allows you to lock blocks for others. default: op From e18f4a60be266fbf1dbac3c264ae293ed6c68b42 Mon Sep 17 00:00:00 2001 From: island219 Date: Fri, 22 Mar 2013 16:09:18 +0000 Subject: [PATCH 4/6] Fix Spelling error. --- Secure-Chests/src/plugin.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Secure-Chests/src/plugin.yml b/Secure-Chests/src/plugin.yml index aacef02..527376b 100644 --- a/Secure-Chests/src/plugin.yml +++ b/Secure-Chests/src/plugin.yml @@ -66,7 +66,7 @@ permissions: description: Allows you lock allowed blocks. default: true securechests.lock.transfer: - description: Allows you to use /sc chagneowner on your own chests. + description: Allows you to use /sc changeowner on your own chests. default: true securechests.bypass.lock: description: Allows you to lock blocks for others. From 044f09638c72f5d9e6118991d09e1c3eeb2e4820 Mon Sep 17 00:00:00 2001 From: island219 Date: Fri, 22 Mar 2013 16:19:48 +0000 Subject: [PATCH 5/6] Added is, Fixed permissions --- Secure-Chests/src/plugin.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Secure-Chests/src/plugin.yml b/Secure-Chests/src/plugin.yml index 527376b..11bdae3 100644 --- a/Secure-Chests/src/plugin.yml +++ b/Secure-Chests/src/plugin.yml @@ -2,7 +2,7 @@ name: SecureChests main: me.HAklowner.SecureChests.SecureChests version: 0.7.1 dev-url: http://dev.bukkit.org/server-mods/secure-chests/ -author: HAklowner +author: [HAklowner,i2] website: http://dev.bukkit.org/server-mods/secure-chests/ description: SecureChests - Simple chest locking! softdepend: [SimpleClans2, Vault, ChestShop] @@ -60,8 +60,10 @@ permissions: securechests.bypass.unlock: true securechests.admin.reload: description: Allows you to use the "/sc reload" command + default: op securechests.admin.purge: description: Allows you to use the "/sc purge" command + default: op securechests.lock: description: Allows you lock allowed blocks. default: true From ff5e04d8a3f2641132093dbbc44b38f40f6eb62c Mon Sep 17 00:00:00 2001 From: island219 Date: Fri, 22 Mar 2013 22:34:05 +0000 Subject: [PATCH 6/6] Added Preliminary Support for SimpleClans 2 Added Preliminary support for Simple Clans 2. May be buggy/non-functional (UNTESTED) --- .gitignore | 5 +- .../SecureChests/Commands/AddCommand.java | 23 +- .../SecureChests/Commands/DenyCommand.java | 7 +- .../SecureChests/Commands/GaddCommand.java | 7 +- .../SecureChests/Commands/GinfoCommand.java | 7 +- .../SecureChests/Commands/GremoveCommand.java | 7 +- .../SecureChests/Commands/RemoveCommand.java | 7 +- .../Listeners/SecureChestsPlayerListener.java | 23 +- .../src/me/HAklowner/SecureChests/Lock.java | 888 +++++------ .../HAklowner/SecureChests/SecureChests.java | 8 +- build.xml | 74 + manifest.mf | 3 + nbproject/build-impl.xml | 1381 +++++++++++++++++ nbproject/genfiles.properties | 8 + nbproject/project.properties | 92 ++ nbproject/project.xml | 13 + 16 files changed, 2072 insertions(+), 481 deletions(-) create mode 100644 build.xml create mode 100644 manifest.mf create mode 100644 nbproject/build-impl.xml create mode 100644 nbproject/genfiles.properties create mode 100644 nbproject/project.properties create mode 100644 nbproject/project.xml diff --git a/.gitignore b/.gitignore index 5e3fa0b..5bd71a7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ /Secure-Chests/nbproject/private/ /Secure-Chests/build/ -/Secure-Chests/dist/ \ No newline at end of file +/Secure-Chests/dist/ +/nbproject/private/ +/dist/ +/build/ \ No newline at end of file diff --git a/Secure-Chests/src/me/HAklowner/SecureChests/Commands/AddCommand.java b/Secure-Chests/src/me/HAklowner/SecureChests/Commands/AddCommand.java index 90cc54e..741ae92 100644 --- a/Secure-Chests/src/me/HAklowner/SecureChests/Commands/AddCommand.java +++ b/Secure-Chests/src/me/HAklowner/SecureChests/Commands/AddCommand.java @@ -1,19 +1,18 @@ package me.HAklowner.SecureChests.Commands; -import net.sacredlabyrinth.phaed.simpleclans.Clan; -import net.sacredlabyrinth.phaed.simpleclans.managers.ClanManager; - -import org.bukkit.ChatColor; -import org.bukkit.command.Command; -import org.bukkit.command.CommandSender; -import org.bukkit.entity.Player; - -import me.HAklowner.SecureChests.Permission; -import me.HAklowner.SecureChests.SecureChests; +import com.p000ison.dev.simpleclans2.api.clan.Clan; +import com.p000ison.dev.simpleclans2.api.clan.ClanManager; +import com.p000ison.dev.simpleclans2.api.clanplayer.ClanPlayer; import me.HAklowner.SecureChests.Config.Config; import me.HAklowner.SecureChests.Config.Language; +import me.HAklowner.SecureChests.Permission; +import me.HAklowner.SecureChests.SecureChests; import me.HAklowner.SecureChests.Utils.Atype; import me.HAklowner.SecureChests.Utils.Vlevel; +import org.bukkit.ChatColor; +import org.bukkit.command.Command; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; public class AddCommand { @@ -66,13 +65,13 @@ public boolean onCommand(CommandSender sender, Command command, String label, St { String clanTag = ChatColor.stripColor(args[0].substring(2)); ClanManager cm = plugin.simpleClans.getClanManager(); - if (cm.isClan(clanTag)) + if (cm.existsClanByName(clanTag)) { Clan clan = cm.getClan(clanTag); plugin.scCmd.put(player, 3); //value of 3 add to access list. plugin.scAList.put(player, clan.getTag()); //clan tag. plugin.scAtype.put(player, Atype.Clan); //we want to add a clan. - plugin.sendMessage(Vlevel.COMMAND, player, Config.getLocal(Language.INTERACT_ADD_CLAN).replace("%clantag", clan.getTagLabel() + ChatColor.WHITE)); + plugin.sendMessage(Vlevel.COMMAND, player, Config.getLocal(Language.INTERACT_ADD_CLAN).replace("%clantag", clan.getTag() + ChatColor.WHITE)); } else { diff --git a/Secure-Chests/src/me/HAklowner/SecureChests/Commands/DenyCommand.java b/Secure-Chests/src/me/HAklowner/SecureChests/Commands/DenyCommand.java index 0fad7dd..5ee0d4e 100644 --- a/Secure-Chests/src/me/HAklowner/SecureChests/Commands/DenyCommand.java +++ b/Secure-Chests/src/me/HAklowner/SecureChests/Commands/DenyCommand.java @@ -1,7 +1,8 @@ package me.HAklowner.SecureChests.Commands; -import net.sacredlabyrinth.phaed.simpleclans.Clan; -import net.sacredlabyrinth.phaed.simpleclans.managers.ClanManager; +import com.p000ison.dev.simpleclans2.api.clan.Clan; +import com.p000ison.dev.simpleclans2.api.clan.ClanManager; +import com.p000ison.dev.simpleclans2.api.clanplayer.ClanPlayer; import org.bukkit.ChatColor; import org.bukkit.command.Command; @@ -66,7 +67,7 @@ public boolean onCommand(CommandSender sender, Command command, String label, St { String clanTag = args[0].substring(2); ClanManager cm = plugin.simpleClans.getClanManager(); - if (cm.isClan(clanTag)) + if (cm.existsClanByName(clanTag)) { Clan clan = cm.getClan(clanTag); plugin.sendMessage(Vlevel.COMMAND, player, Config.getLocal(Language.INTERACT_DENY_CLAN).replace("%clantag", clanTag + ChatColor.WHITE)); diff --git a/Secure-Chests/src/me/HAklowner/SecureChests/Commands/GaddCommand.java b/Secure-Chests/src/me/HAklowner/SecureChests/Commands/GaddCommand.java index 5da7b89..e3104bc 100644 --- a/Secure-Chests/src/me/HAklowner/SecureChests/Commands/GaddCommand.java +++ b/Secure-Chests/src/me/HAklowner/SecureChests/Commands/GaddCommand.java @@ -1,6 +1,7 @@ package me.HAklowner.SecureChests.Commands; -import net.sacredlabyrinth.phaed.simpleclans.managers.ClanManager; +import com.p000ison.dev.simpleclans2.api.clan.ClanManager; +import com.p000ison.dev.simpleclans2.api.clanplayer.ClanPlayer; import org.bukkit.ChatColor; import org.bukkit.command.Command; @@ -65,12 +66,12 @@ public boolean onCommand(CommandSender sender, Command command, String label, St { String clanTag = ChatColor.stripColor(args[0].substring(2)); ClanManager cm = plugin.simpleClans.getClanManager(); - if (cm.isClan(clanTag)) + if (cm.existsClanByName(clanTag)) { if (!plugin.getLockManager().clanOnGlobalList(player.getName(), clanTag)) { plugin.getLockManager().addToGlobalList(player.getName(), clanTag, "clan"); - clanTag = cm.getClan(clanTag).getTagLabel(); + clanTag = cm.getClan(clanTag).getTag(); plugin.sendMessage(Vlevel.COMMAND, player, Config.getLocal(Language.NOTICE_GADD_CLAN).replace("%clantag", clanTag + ChatColor.WHITE)); } else diff --git a/Secure-Chests/src/me/HAklowner/SecureChests/Commands/GinfoCommand.java b/Secure-Chests/src/me/HAklowner/SecureChests/Commands/GinfoCommand.java index 7fdd2fb..d39cf6b 100644 --- a/Secure-Chests/src/me/HAklowner/SecureChests/Commands/GinfoCommand.java +++ b/Secure-Chests/src/me/HAklowner/SecureChests/Commands/GinfoCommand.java @@ -1,5 +1,6 @@ package me.HAklowner.SecureChests.Commands; +import com.p000ison.dev.simpleclans2.api.clan.Clan; import java.util.HashSet; import java.util.List; import java.util.Map; @@ -11,7 +12,9 @@ import me.HAklowner.SecureChests.Config.Language; import me.HAklowner.SecureChests.Utils.Atype; import me.HAklowner.SecureChests.Utils.Vlevel; -import net.sacredlabyrinth.phaed.simpleclans.Clan; + +import com.p000ison.dev.simpleclans2.api.clan.ClanManager; +import com.p000ison.dev.simpleclans2.api.clanplayer.ClanPlayer; import org.bukkit.ChatColor; import org.bukkit.command.Command; @@ -92,7 +95,7 @@ else if (args.length == 1) { Clan c = plugin.simpleClans.getClanManager().getClan(tag); if (c != null) { - ctag = c.getTagLabel() + ChatColor.GREEN; + ctag = c.getTag() + ChatColor.GREEN; } } fixedlist.add(ctag); diff --git a/Secure-Chests/src/me/HAklowner/SecureChests/Commands/GremoveCommand.java b/Secure-Chests/src/me/HAklowner/SecureChests/Commands/GremoveCommand.java index 83016e2..01ff8d6 100644 --- a/Secure-Chests/src/me/HAklowner/SecureChests/Commands/GremoveCommand.java +++ b/Secure-Chests/src/me/HAklowner/SecureChests/Commands/GremoveCommand.java @@ -1,6 +1,7 @@ package me.HAklowner.SecureChests.Commands; -import net.sacredlabyrinth.phaed.simpleclans.managers.ClanManager; +import com.p000ison.dev.simpleclans2.api.clan.ClanManager; +import com.p000ison.dev.simpleclans2.api.clanplayer.ClanPlayer; import org.bukkit.ChatColor; import org.bukkit.command.Command; @@ -63,9 +64,9 @@ else if (args[0].toLowerCase().startsWith("c:")) { //they want to add a clan not if (plugin.usingSimpleClans) { ClanManager cm = plugin.simpleClans.getClanManager(); - if (cm.isClan(clanTag)) + if (cm.existsClanByName(clanTag)) { - colorTag = cm.getClan(clanTag).getTagLabel(); + colorTag = cm.getClan(clanTag).getTag(); } } diff --git a/Secure-Chests/src/me/HAklowner/SecureChests/Commands/RemoveCommand.java b/Secure-Chests/src/me/HAklowner/SecureChests/Commands/RemoveCommand.java index 4931d46..23bc1cf 100644 --- a/Secure-Chests/src/me/HAklowner/SecureChests/Commands/RemoveCommand.java +++ b/Secure-Chests/src/me/HAklowner/SecureChests/Commands/RemoveCommand.java @@ -1,6 +1,7 @@ package me.HAklowner.SecureChests.Commands; -import net.sacredlabyrinth.phaed.simpleclans.managers.ClanManager; +import com.p000ison.dev.simpleclans2.api.clan.ClanManager; +import com.p000ison.dev.simpleclans2.api.clanplayer.ClanPlayer; import org.bukkit.ChatColor; import org.bukkit.command.Command; @@ -67,8 +68,8 @@ public boolean onCommand(CommandSender sender, Command command, String label, St String colorTag = clanTag; if (plugin.usingSimpleClans) { ClanManager cm = plugin.simpleClans.getClanManager(); - if (cm.isClan(clanTag)) { - colorTag = cm.getClan(clanTag).getTagLabel(); + if (cm.existsClanByName(clanTag)) { + colorTag = cm.getClan(clanTag).getTag(); } } plugin.sendMessage(Vlevel.COMMAND, player, Config.getLocal(Language.INTERACT_REMOVE_CLAN).replace("%clantag", colorTag + ChatColor.WHITE)); diff --git a/Secure-Chests/src/me/HAklowner/SecureChests/Listeners/SecureChestsPlayerListener.java b/Secure-Chests/src/me/HAklowner/SecureChests/Listeners/SecureChestsPlayerListener.java index 825ef99..328fc15 100644 --- a/Secure-Chests/src/me/HAklowner/SecureChests/Listeners/SecureChestsPlayerListener.java +++ b/Secure-Chests/src/me/HAklowner/SecureChests/Listeners/SecureChestsPlayerListener.java @@ -11,12 +11,13 @@ import me.HAklowner.SecureChests.Config.Language; import me.HAklowner.SecureChests.Utils.Atype; import me.HAklowner.SecureChests.Utils.Vlevel; -import net.sacredlabyrinth.phaed.simpleclans.Clan; + +import com.p000ison.dev.simpleclans2.api.clan.Clan; import org.bukkit.ChatColor; import org.bukkit.Location; import org.bukkit.block.Block; -import org.bukkit.entity.Player; +import org.bukkit.entity.Player; import org.bukkit.event.block.Action; import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.event.player.PlayerJoinEvent; @@ -74,7 +75,7 @@ public void onPlayerInteract(PlayerInteractEvent event) { Clan clan = plugin.simpleClans.getClanManager().getClan(aListEntry); if (clan != null) { - clantag = clan.getTagLabel(); + clantag = clan.getTag(); } else { @@ -113,8 +114,8 @@ else if (cmdStatus == 12 && (Permission.has(player, Permission.INFO) || access = { Map info = lock.getPlayerAccessList(); Set names = info.keySet(); - Set allow = new HashSet(); - Set deny = new HashSet(); + Set allow = new HashSet<>(); + Set deny = new HashSet<>(); if(plugin.usingSimpleClans) { Map cinfo = lock.getClanAccessList(); @@ -125,7 +126,7 @@ else if (cmdStatus == 12 && (Permission.has(player, Permission.INFO) || access = if (c != null) { plugin.sendMessage(Vlevel.DEBUG, player, cname + " found"); - String ctag = c.getColorTag(); + String ctag = c.getTag(); if (cinfo.get(cname)) { @@ -179,12 +180,14 @@ else if (cmdStatus == 12 && (Permission.has(player, Permission.INFO) || access = } String pub = ChatColor.RED + Config.getLocal(Language.LANG_NO); - if (lock.isPublic()) - pub = ChatColor.GREEN + Config.getLocal(Language.LANG_YES); + if (lock.isPublic()) { + pub = ChatColor.GREEN + Config.getLocal(Language.LANG_YES); + } String reslock = ChatColor.RED + Config.getLocal(Language.LANG_NO); - if (lock.isResouseLocked()) - reslock = ChatColor.GREEN + Config.getLocal(Language.LANG_YES); + if (lock.isResouseLocked()) { + reslock = ChatColor.GREEN + Config.getLocal(Language.LANG_YES); + } plugin.sendMessage(Vlevel.COMMAND, player, ChatColor.GOLD + "======== "+owner+"'s "+blockName+" ========"); plugin.sendMessage(Vlevel.COMMAND, player, ChatColor.AQUA + Config.getLocal(Language.PUBLIC) +": " + pub + ChatColor.AQUA + " " + Config.getLocal(Language.RESOURCE_LOCK) +": " + reslock); diff --git a/Secure-Chests/src/me/HAklowner/SecureChests/Lock.java b/Secure-Chests/src/me/HAklowner/SecureChests/Lock.java index cdd6a05..9dd9bce 100644 --- a/Secure-Chests/src/me/HAklowner/SecureChests/Lock.java +++ b/Secure-Chests/src/me/HAklowner/SecureChests/Lock.java @@ -5,8 +5,11 @@ import me.HAklowner.SecureChests.Utils.Atype; import me.HAklowner.SecureChests.Utils.Vlevel; import net.milkbowl.vault.permission.Permission; -import net.sacredlabyrinth.phaed.simpleclans.Clan; -import net.sacredlabyrinth.phaed.simpleclans.ClanPlayer; + +import com.p000ison.dev.simpleclans2.SimpleClans; +import com.p000ison.dev.simpleclans2.api.clan.Clan; +import com.p000ison.dev.simpleclans2.api.clanplayer.ClanPlayer; +import com.p000ison.dev.simpleclans2.clan.CraftClan; import org.bukkit.Location; import org.bukkit.Material; @@ -16,445 +19,444 @@ import org.bukkit.material.Door; public class Lock { - public SecureChests plugin; - - - //New Vairables - private String owner; - private Map playerAccess; - private Map clanAccess; - private Map groupAccess; - private Boolean isPublic; - private Location lockLoc; - private int id; - private Boolean resourcelock; - private Boolean withdraw; - private Boolean deposit; - - private static final BlockFace[] BLOCK_FACES = {BlockFace.EAST, BlockFace.WEST, BlockFace.NORTH, BlockFace.SOUTH}; - - private Location getCorrectedLoc(Location loc) { - Block b = loc.getBlock(); - Location blockl = loc; - - if(b.getType() == Material.CHEST) - { - for (BlockFace face : BLOCK_FACES) - { - Block reletive = b.getRelative(face); - if (reletive.getType() == Material.CHEST) - { - if (face.equals(BlockFace.NORTH) || face.equals(BlockFace.EAST)) - { - blockl = reletive.getLocation(); - } - - } - } - } - - //Start Door Corrections - - else if(b.getType() == Material.WOODEN_DOOR) { //make sure block click is a DOOR - - Door d = (Door)b.getState().getData(); - - if (d.isTopHalf()) { //You clicked on the top part of the door! correct location to reflect bottom part - blockl = blockl.subtract(0,1,0); - } - }//End Door Corrections - return blockl; - } - - public Lock(Location loc) { - Location temp = new Location(loc.getWorld(), loc.getX(), loc.getY(), loc.getZ()); - plugin = SecureChests.getInstance(); - lockLoc = getCorrectedLoc(temp); - } - - public boolean isResouseLocked() { - return resourcelock; - } - - public boolean getWithdrawState() { - return withdraw; - } - - public boolean getDepositState() { - return deposit; - } - - public Location getLocation() { - return lockLoc; - } - - public void setLocation(Location loc) { - lockLoc = loc; - } - - public int getID() { - return id; - } - - public Map getPlayerAccessList() { - return playerAccess; - } - - public Map getClanAccessList() { - return clanAccess; - } - - public Map getGroupAccessList() { - return groupAccess; - } - - public boolean onAccessList(String player) { - if(playerAccess.containsKey(player)) - if(playerAccess.get(player)) - return true; - return false; - } - - - //new API calls for access lists. - - public boolean onAccessList(Atype Atype, String name) { - if (Atype == me.HAklowner.SecureChests.Utils.Atype.Clan) { - if(clanAccess.containsKey(name)) - if(clanAccess.get(name)) - return true; - } else if (Atype == me.HAklowner.SecureChests.Utils.Atype.Group) { - if(groupAccess.containsKey(name)) - if(groupAccess.get(name)) - return true; - } else if (Atype == me.HAklowner.SecureChests.Utils.Atype.Player) { - if(playerAccess.containsKey(name)) - if(playerAccess.get(name)) - return true; - } - return false; - } - - public boolean onDenyList(Atype Atype, String name) { - if (Atype == me.HAklowner.SecureChests.Utils.Atype.Clan) { - if(clanAccess.get(name) != null && !clanAccess.get(name)) - return true; - } else if (Atype == me.HAklowner.SecureChests.Utils.Atype.Group) { - if(groupAccess.get(name) != null && !playerAccess.get(name)) - return true; - } else if (Atype == me.HAklowner.SecureChests.Utils.Atype.Player) { - if(playerAccess.get(name) != null && !playerAccess.get(name)) - return true; - } - return false; - } - - public boolean addToAccessList(Atype Atype, String name) { - if (Atype == me.HAklowner.SecureChests.Utils.Atype.Clan) { - if (!clanAccess.containsKey(name)) { - clanAccess.put(name, true); - plugin.getLockManager().addToAcessList(this, name, "clan", true); - return true; - } else if(!clanAccess.get(name)) { - clanAccess.put(name, true); - plugin.getLockManager().addToAcessList(this, name, "clan", true); - return true; - } - } else if (Atype == me.HAklowner.SecureChests.Utils.Atype.Group) { - if (!groupAccess.containsKey(name)) { - groupAccess.put(name, true); - plugin.getLockManager().addToAcessList(this, name, "group", true); - return true; - } else if(!groupAccess.get(name)) { - groupAccess.put(name, true); - plugin.getLockManager().addToAcessList(this, name, "group", true); - return true; - } - } else if (Atype == me.HAklowner.SecureChests.Utils.Atype.Player) { - if (!playerAccess.containsKey(name)) { - playerAccess.put(name, true); - plugin.getLockManager().addToAcessList(this, name, "player", true); - return true; - } else if(!playerAccess.get(name)) { - playerAccess.put(name, true); - plugin.getLockManager().addToAcessList(this, name, "player", true); - return true; - } - } - return false; - } - - - public boolean removeFromAccessList(Atype Atype, String name) { - if (Atype == me.HAklowner.SecureChests.Utils.Atype.Clan) { - if (clanAccess.containsKey(name)) { - clanAccess.remove(name); - plugin.getLockManager().removeFromAccessList(this, name, "clan"); - return true; - } - } else if (Atype == me.HAklowner.SecureChests.Utils.Atype.Group) { - if (groupAccess.containsKey(name)) { - groupAccess.remove(name); - plugin.getLockManager().removeFromAccessList(this, name, "group"); - return true; - } - } else if (Atype == me.HAklowner.SecureChests.Utils.Atype.Player) { - if (playerAccess.containsKey(name)) { - playerAccess.remove(name); - plugin.getLockManager().removeFromAccessList(this, name, "player"); - return true; - } - } - return false; - } - - public boolean addToDenyList(Atype Atype, String name) { - if (Atype == me.HAklowner.SecureChests.Utils.Atype.Clan) { - if(!clanAccess.containsKey(name) || clanAccess.get(name)) { - clanAccess.put(name, false); - plugin.getLockManager().addToAcessList(this, name, "clan", false); - return true; - } - } else if (Atype == me.HAklowner.SecureChests.Utils.Atype.Group) { - if(!groupAccess.containsKey(name) || groupAccess.get(name)) { - groupAccess.put(name, false); - plugin.getLockManager().addToAcessList(this, name, "group", false); - return true; - } - } else if (Atype == me.HAklowner.SecureChests.Utils.Atype.Player) { - if(!playerAccess.containsKey(name) || playerAccess.get(name)) { - playerAccess.put(name, false); - plugin.getLockManager().addToAcessList(this, name, "player", false); - return true; - } - } - return false; - } - - //end new API calls - - - public boolean onAccessList(Clan clan) { - String clantag = clan.getTag().toLowerCase(); - if(clanAccess.containsKey(clantag)) - if(clanAccess.get(clantag)) - return true; - return false; - } - - public boolean onDenyList(String player) - { - if(playerAccess.get(player) != null && !playerAccess.get(player)) - return true; - return false; - } - - public boolean onDenyList(Clan clan) - { - if(clanAccess.get(clan.getTag().toLowerCase()) != null && !clanAccess.get(clan.getTag().toLowerCase())) - return true; - return false; - } - - public boolean onGlobalList(String player) - { - - if(plugin.getLockManager().playerOnGlobalList(owner, player)) - return true; - return false; - } - - public boolean onGlobalList(Clan clan) - { - if(plugin.getLockManager().clanOnGlobalList(owner, clan.getTag())) - return true; - return false; - } - - public boolean isPublic() { - return isPublic; - } - - public void setPublic(boolean set) { - isPublic = set; - plugin.getLockManager().updateLock(this); - } - - public void lock(String player) { - owner = player; - Lock nl = plugin.getLockManager().newLock(this); - id = nl.getID(); - } - - public void updateLock() { - plugin.getLockManager().updateLock(this); - } - - public void unlock() { - plugin.getLockManager().removeLock(this); - } - - public boolean addToAccessList(String player) { - if (!playerAccess.containsKey(player)) { - playerAccess.put(player, true); - plugin.getLockManager().addToAcessList(this, player, "player", true); - return true; - } else if (!playerAccess.get(player)) { - playerAccess.put(player, true); - plugin.getLockManager().addToAcessList(this, player, "player", true); - return true; - } - return false; - } - - public boolean addToAccessList(Clan clan) { - String clanTag = clan.getTag().toLowerCase(); - if (!clanAccess.containsKey(clanTag)) { - clanAccess.put(clanTag, true); - plugin.getLockManager().addToAcessList(this, clanTag, "clan", true); - return true; - } else if(!clanAccess.get(clanTag)) { - clanAccess.put(clanTag, true); - plugin.getLockManager().addToAcessList(this, clanTag, "clan", true); - return true; - } - return false; - } - - public boolean addToAccessList(String clanTag, Boolean isClan) { - if (!clanAccess.containsKey(clanTag) || !clanAccess.get(clanTag)) { - clanAccess.put(clanTag, true); - plugin.getLockManager().addToAcessList(this, clanTag, "clan", true); - return true; - } - return false; - } - - public boolean addToDenyList(String player) { - - if(!playerAccess.containsKey(player) || playerAccess.get(player)) { - playerAccess.put(player, false); - plugin.getLockManager().addToAcessList(this, player, "player", false); - return true; - } - return false; - } - - public boolean addToDenyList(Clan clan) { - - String clanTag = clan.getTag().toLowerCase(); - if(!clanAccess.containsKey(clanTag) || clanAccess.get(clanTag)) { - clanAccess.put(clanTag, false); - plugin.getLockManager().addToAcessList(this, clanTag, "clan", false); - return true; - } - return false; - } - - public Integer getAccess(String player) { - //Return what access player has. - - if (player.equals(getOwner())) { - return 1; //return positive you own this chest - } - - //check Deny list first and return no access if your on it! check AFTER owner so you don't lock yourself out! X_X - if (onDenyList(player)) { - return 0; - } - - if (isPublic()) { - return 4; //return positive public chest. - } - - if (onAccessList(player) || (onGlobalList(player))) { - return 2; //return positive your on one of the access lists - } - - if(plugin.usingSimpleClans) { - ClanPlayer cp = plugin.simpleClans.getClanManager().getClanPlayer(player); - - if (cp != null) { - Clan clan = cp.getClan(); - if (onAccessList(clan) || (onGlobalList(clan) && !onDenyList(clan))) { - return 2; // access though lists. - } - } - } - - if (plugin.vaultEnabled()) - { - Permission perm = plugin.getVault(); - String[] groups = perm.getPlayerGroups(lockLoc.getWorld().getName(), owner); - Player p = plugin.getServer().getPlayer(player); - plugin.sendMessage(Vlevel.DEBUG, p, "Vault enabled, checking Alist for groups."); - for (String group: groups) { - plugin.sendMessage(Vlevel.DEBUG, p, "checking for " + group); - if (groupAccess.containsKey(group)) { - plugin.sendMessage(Vlevel.DEBUG, p, group + " found!"); - return 2; - } - } - } - - if (me.HAklowner.SecureChests.Permission.has(plugin.getServer().getPlayer(player), me.HAklowner.SecureChests.Permission.BYPASS_OPEN)) { - return 3; //return positive. you have bypass ability. - } - - if (plugin.vaultEnabled()) { - Permission perm = plugin.getVault(); - String[] groups = perm.getPlayerGroups(lockLoc.getWorld().getName(), owner); - Player p = plugin.getServer().getPlayer(player); - plugin.sendMessage(Vlevel.DEBUG, p, "Vault enabled checking override groups now."); - for (String group: groups) { - plugin.sendMessage(Vlevel.DEBUG, p, "checking for " + group); - if (me.HAklowner.SecureChests.Permission.GroupName(p, me.HAklowner.SecureChests.Permission.BYPASS_OPEN_GROUP, group)) { - plugin.sendMessage(Vlevel.DEBUG, p, group + " found!"); - return 3; - } - } - } - - return 0; - } - - public Integer getAccess(Player player) { - return getAccess(player.getName()); - } - - public String getOwner() { - return owner; - } - - public void setWithdraw(boolean state) { - withdraw = state; - } - - public void setDeposit(boolean state) { - deposit = state; - } - - public void setResouseLock(boolean state) { - resourcelock = state; - } - - public void setOwner(String newOwner) { - owner = newOwner; - } - - public void setPlayerAccessList(Map playerAccessList) { - playerAccess = playerAccessList; - } - - public void setGroupAccessList(Map groupAccessList) { - groupAccess = groupAccessList; - } - - public void setClanAccessList(Map clanAccessList) { - clanAccess = clanAccessList; - } - - public void setID(int id) { - this.id = id; - } + + public SecureChests plugin; + //New Vairables + private String owner; + private Map playerAccess; + private Map clanAccess; + private Map groupAccess; + private Boolean isPublic; + private Location lockLoc; + private int id; + private Boolean resourcelock; + private Boolean withdraw; + private Boolean deposit; + private static final BlockFace[] BLOCK_FACES = {BlockFace.EAST, BlockFace.WEST, BlockFace.NORTH, BlockFace.SOUTH}; + + private Location getCorrectedLoc(Location loc) { + Block b = loc.getBlock(); + Location blockl = loc; + + if (b.getType() == Material.CHEST) { + for (BlockFace face : BLOCK_FACES) { + Block reletive = b.getRelative(face); + if (reletive.getType() == Material.CHEST) { + if (face.equals(BlockFace.NORTH) || face.equals(BlockFace.EAST)) { + blockl = reletive.getLocation(); + } + + } + } + } //Start Door Corrections + else if (b.getType() == Material.WOODEN_DOOR) { //make sure block click is a DOOR + + Door d = (Door) b.getState().getData(); + + if (d.isTopHalf()) { //You clicked on the top part of the door! correct location to reflect bottom part + blockl = blockl.subtract(0, 1, 0); + } + }//End Door Corrections + return blockl; + } + + public Lock(Location loc) { + Location temp = new Location(loc.getWorld(), loc.getX(), loc.getY(), loc.getZ()); + plugin = SecureChests.getInstance(); + lockLoc = getCorrectedLoc(temp); + } + + public boolean isResouseLocked() { + return resourcelock; + } + + public boolean getWithdrawState() { + return withdraw; + } + + public boolean getDepositState() { + return deposit; + } + + public Location getLocation() { + return lockLoc; + } + + public void setLocation(Location loc) { + lockLoc = loc; + } + + public int getID() { + return id; + } + + public Map getPlayerAccessList() { + return playerAccess; + } + + public Map getClanAccessList() { + return clanAccess; + } + + public Map getGroupAccessList() { + return groupAccess; + } + + public boolean onAccessList(String player) { + if (playerAccess.containsKey(player)) { + if (playerAccess.get(player)) { + return true; + } + } + return false; + } + + //new API calls for access lists. + public boolean onAccessList(Atype Atype, String name) { + if (Atype == me.HAklowner.SecureChests.Utils.Atype.Clan) { + if (clanAccess.containsKey(name)) { + if (clanAccess.get(name)) { + return true; + } + } + } else if (Atype == me.HAklowner.SecureChests.Utils.Atype.Group) { + if (groupAccess.containsKey(name)) { + if (groupAccess.get(name)) { + return true; + } + } + } else if (Atype == me.HAklowner.SecureChests.Utils.Atype.Player) { + if (playerAccess.containsKey(name)) { + if (playerAccess.get(name)) { + return true; + } + } + } + return false; + } + + public boolean onDenyList(Atype Atype, String name) { + if (Atype == me.HAklowner.SecureChests.Utils.Atype.Clan) { + if (clanAccess.get(name) != null && !clanAccess.get(name)) { + return true; + } + } else if (Atype == me.HAklowner.SecureChests.Utils.Atype.Group) { + if (groupAccess.get(name) != null && !playerAccess.get(name)) { + return true; + } + } else if (Atype == me.HAklowner.SecureChests.Utils.Atype.Player) { + if (playerAccess.get(name) != null && !playerAccess.get(name)) { + return true; + } + } + return false; + } + + public boolean addToAccessList(Atype Atype, String name) { + if (Atype == me.HAklowner.SecureChests.Utils.Atype.Clan) { + if (!clanAccess.containsKey(name)) { + clanAccess.put(name, true); + plugin.getLockManager().addToAcessList(this, name, "clan", true); + return true; + } else if (!clanAccess.get(name)) { + clanAccess.put(name, true); + plugin.getLockManager().addToAcessList(this, name, "clan", true); + return true; + } + } else if (Atype == me.HAklowner.SecureChests.Utils.Atype.Group) { + if (!groupAccess.containsKey(name)) { + groupAccess.put(name, true); + plugin.getLockManager().addToAcessList(this, name, "group", true); + return true; + } else if (!groupAccess.get(name)) { + groupAccess.put(name, true); + plugin.getLockManager().addToAcessList(this, name, "group", true); + return true; + } + } else if (Atype == me.HAklowner.SecureChests.Utils.Atype.Player) { + if (!playerAccess.containsKey(name)) { + playerAccess.put(name, true); + plugin.getLockManager().addToAcessList(this, name, "player", true); + return true; + } else if (!playerAccess.get(name)) { + playerAccess.put(name, true); + plugin.getLockManager().addToAcessList(this, name, "player", true); + return true; + } + } + return false; + } + + public boolean removeFromAccessList(Atype Atype, String name) { + if (Atype == me.HAklowner.SecureChests.Utils.Atype.Clan) { + if (clanAccess.containsKey(name)) { + clanAccess.remove(name); + plugin.getLockManager().removeFromAccessList(this, name, "clan"); + return true; + } + } else if (Atype == me.HAklowner.SecureChests.Utils.Atype.Group) { + if (groupAccess.containsKey(name)) { + groupAccess.remove(name); + plugin.getLockManager().removeFromAccessList(this, name, "group"); + return true; + } + } else if (Atype == me.HAklowner.SecureChests.Utils.Atype.Player) { + if (playerAccess.containsKey(name)) { + playerAccess.remove(name); + plugin.getLockManager().removeFromAccessList(this, name, "player"); + return true; + } + } + return false; + } + + public boolean addToDenyList(Atype Atype, String name) { + if (Atype == me.HAklowner.SecureChests.Utils.Atype.Clan) { + if (!clanAccess.containsKey(name) || clanAccess.get(name)) { + clanAccess.put(name, false); + plugin.getLockManager().addToAcessList(this, name, "clan", false); + return true; + } + } else if (Atype == me.HAklowner.SecureChests.Utils.Atype.Group) { + if (!groupAccess.containsKey(name) || groupAccess.get(name)) { + groupAccess.put(name, false); + plugin.getLockManager().addToAcessList(this, name, "group", false); + return true; + } + } else if (Atype == me.HAklowner.SecureChests.Utils.Atype.Player) { + if (!playerAccess.containsKey(name) || playerAccess.get(name)) { + playerAccess.put(name, false); + plugin.getLockManager().addToAcessList(this, name, "player", false); + return true; + } + } + return false; + } + + //end new API calls + public boolean onAccessList(CraftClan clan) { + String clantag = clan.getTag().toLowerCase(); + if (clanAccess.containsKey(clantag)) { + if (clanAccess.get(clantag)) { + return true; + } + } + return false; + } + + public boolean onDenyList(String player) { + if (playerAccess.get(player) != null && !playerAccess.get(player)) { + return true; + } + return false; + } + + public boolean onDenyList(CraftClan clan) { + if (clanAccess.get(clan.getTag().toLowerCase()) != null && !clanAccess.get(clan.getTag().toLowerCase())) { + return true; + } + return false; + } + + public boolean onGlobalList(String player) { + + if (plugin.getLockManager().playerOnGlobalList(owner, player)) { + return true; + } + return false; + } + + public boolean onGlobalList(CraftClan clan) { + if (plugin.getLockManager().clanOnGlobalList(owner, clan.getTag())) { + return true; + } + return false; + } + + public boolean isPublic() { + return isPublic; + } + + public void setPublic(boolean set) { + isPublic = set; + plugin.getLockManager().updateLock(this); + } + + public void lock(String player) { + owner = player; + Lock nl = plugin.getLockManager().newLock(this); + id = nl.getID(); + } + + public void updateLock() { + plugin.getLockManager().updateLock(this); + } + + public void unlock() { + plugin.getLockManager().removeLock(this); + } + + public boolean addToAccessList(String player) { + if (!playerAccess.containsKey(player)) { + playerAccess.put(player, true); + plugin.getLockManager().addToAcessList(this, player, "player", true); + return true; + } else if (!playerAccess.get(player)) { + playerAccess.put(player, true); + plugin.getLockManager().addToAcessList(this, player, "player", true); + return true; + } + return false; + } + + public boolean addToAccessList(CraftClan clan) { + String clanTag = clan.getTag().toLowerCase(); + if (!clanAccess.containsKey(clanTag)) { + clanAccess.put(clanTag, true); + plugin.getLockManager().addToAcessList(this, clanTag, "clan", true); + return true; + } else if (!clanAccess.get(clanTag)) { + clanAccess.put(clanTag, true); + plugin.getLockManager().addToAcessList(this, clanTag, "clan", true); + return true; + } + return false; + } + + public boolean addToAccessList(String clanTag, Boolean isClan) { + if (!clanAccess.containsKey(clanTag) || !clanAccess.get(clanTag)) { + clanAccess.put(clanTag, true); + plugin.getLockManager().addToAcessList(this, clanTag, "clan", true); + return true; + } + return false; + } + + public boolean addToDenyList(String player) { + + if (!playerAccess.containsKey(player) || playerAccess.get(player)) { + playerAccess.put(player, false); + plugin.getLockManager().addToAcessList(this, player, "player", false); + return true; + } + return false; + } + + public boolean addToDenyList(CraftClan clan) { + + String clanTag = clan.getTag().toLowerCase(); + if (!clanAccess.containsKey(clanTag) || clanAccess.get(clanTag)) { + clanAccess.put(clanTag, false); + plugin.getLockManager().addToAcessList(this, clanTag, "clan", false); + return true; + } + return false; + } + + public Integer getAccess(String player) { + //Return what access player has. + + if (player.equals(getOwner())) { + return 1; //return positive you own this chest + } + + //check Deny list first and return no access if your on it! check AFTER owner so you don't lock yourself out! X_X + if (onDenyList(player)) { + return 0; + } + + if (isPublic()) { + return 4; //return positive public chest. + } + + if (onAccessList(player) || (onGlobalList(player))) { + return 2; //return positive your on one of the access lists + } + + if (plugin.usingSimpleClans) { + //ClanPlayer cp = plugin.simpleClans.getClanManager().getClanPlayerManager(player); + ClanPlayer cp = (ClanPlayer) plugin.simpleClans.getClanPlayerManager(); + + if (cp != null) { + Clan clan = cp.getClan(); + //if (onAccessList(clan) || (onGlobalList(clan) && !onDenyList(clan))) { + return 2; // access though lists. + //} + } + } + + if (plugin.vaultEnabled()) { + Permission perm = plugin.getVault(); + String[] groups = perm.getPlayerGroups(lockLoc.getWorld().getName(), owner); + Player p = plugin.getServer().getPlayer(player); + plugin.sendMessage(Vlevel.DEBUG, p, "Vault enabled, checking Alist for groups."); + for (String group : groups) { + plugin.sendMessage(Vlevel.DEBUG, p, "checking for " + group); + if (groupAccess.containsKey(group)) { + plugin.sendMessage(Vlevel.DEBUG, p, group + " found!"); + return 2; + } + } + } + + if (me.HAklowner.SecureChests.Permission.has(plugin.getServer().getPlayer(player), me.HAklowner.SecureChests.Permission.BYPASS_OPEN)) { + return 3; //return positive. you have bypass ability. + } + + if (plugin.vaultEnabled()) { + Permission perm = plugin.getVault(); + String[] groups = perm.getPlayerGroups(lockLoc.getWorld().getName(), owner); + Player p = plugin.getServer().getPlayer(player); + plugin.sendMessage(Vlevel.DEBUG, p, "Vault enabled checking override groups now."); + for (String group : groups) { + plugin.sendMessage(Vlevel.DEBUG, p, "checking for " + group); + if (me.HAklowner.SecureChests.Permission.GroupName(p, me.HAklowner.SecureChests.Permission.BYPASS_OPEN_GROUP, group)) { + plugin.sendMessage(Vlevel.DEBUG, p, group + " found!"); + return 3; + } + } + } + + return 0; + } + + public Integer getAccess(Player player) { + return getAccess(player.getName()); + } + + public String getOwner() { + return owner; + } + + public void setWithdraw(boolean state) { + withdraw = state; + } + + public void setDeposit(boolean state) { + deposit = state; + } + + public void setResouseLock(boolean state) { + resourcelock = state; + } + + public void setOwner(String newOwner) { + owner = newOwner; + } + + public void setPlayerAccessList(Map playerAccessList) { + playerAccess = playerAccessList; + } + + public void setGroupAccessList(Map groupAccessList) { + groupAccess = groupAccessList; + } + + public void setClanAccessList(Map clanAccessList) { + clanAccess = clanAccessList; + } + + public void setID(int id) { + this.id = id; + } } diff --git a/Secure-Chests/src/me/HAklowner/SecureChests/SecureChests.java b/Secure-Chests/src/me/HAklowner/SecureChests/SecureChests.java index 053a227..a15e6c1 100644 --- a/Secure-Chests/src/me/HAklowner/SecureChests/SecureChests.java +++ b/Secure-Chests/src/me/HAklowner/SecureChests/SecureChests.java @@ -24,7 +24,8 @@ import me.HAklowner.SecureChests.Utils.Verblevel; import me.HAklowner.SecureChests.Utils.Vlevel; -import net.sacredlabyrinth.phaed.simpleclans.SimpleClans2; +import com.p000ison.dev.simpleclans2.SimpleClans; + import org.bukkit.ChatColor; import org.bukkit.command.CommandSender; @@ -81,7 +82,9 @@ public class SecureChests extends JavaPlugin { private static Map createBlockListMap() { Map result = new HashMap(); result.put(23, "dispenser"); + result.put(158, "dispenser"); result.put(54 , "chest"); + result.put(146, "trappedchest"); result.put(61, "furnace"); result.put(62, "furnace"); result.put(64, "door"); @@ -95,7 +98,9 @@ private static Map createBlockListMap() { private static Map createBlockConfigMap() { Map result = new HashMap(); result.put(23, "Dispenser"); + result.put(158, "Dropper"); result.put(54, "Chest"); + result.put(146, "TrappedChest"); result.put(61, "Furnace"); result.put(62, "Furnace"); result.put(64, "Door"); @@ -103,6 +108,7 @@ private static Map createBlockConfigMap() { result.put(107, "Gate"); result.put(117, "Potion"); result.put(84, "Jukebox"); + result.put(154, "Hopper"); return result; } diff --git a/build.xml b/build.xml new file mode 100644 index 0000000..294eeaa --- /dev/null +++ b/build.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + Builds, tests, and runs the project SecureChests. + + + diff --git a/manifest.mf b/manifest.mf new file mode 100644 index 0000000..328e8e5 --- /dev/null +++ b/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/nbproject/build-impl.xml b/nbproject/build-impl.xml new file mode 100644 index 0000000..3a99251 --- /dev/null +++ b/nbproject/build-impl.xml @@ -0,0 +1,1381 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + + + + + + java -cp "${run.classpath.with.dist.jar}" ${main.class} + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/nbproject/genfiles.properties b/nbproject/genfiles.properties new file mode 100644 index 0000000..49bc147 --- /dev/null +++ b/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=c9e60f53 +build.xml.script.CRC32=64295416 +build.xml.stylesheet.CRC32=28e38971@1.53.1.46 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=c9e60f53 +nbproject/build-impl.xml.script.CRC32=29650439 +nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.53.1.46 diff --git a/nbproject/project.properties b/nbproject/project.properties new file mode 100644 index 0000000..9202772 --- /dev/null +++ b/nbproject/project.properties @@ -0,0 +1,92 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +application.title=SecureChests +application.vendor=Admin +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/SecureChests.jar +dist.javadoc.dir=${dist.dir}/javadoc +endorsed.classpath= +excludes= +file.reference.chestshop.jar=/Users/Admin/git/Bukkit_Library/chestshop.jar +file.reference.craftbukkit-1.5pre-R0.1-SNAPSHOT.jar=/Users/Admin/git/CraftBukkit/target/craftbukkit-1.5pre-R0.1-SNAPSHOT.jar +file.reference.Secure-Chests-src=Secure-Chests/src +file.reference.SimpleClans.jar=/Users/Admin/Downloads/SimpleClans.jar +file.reference.Vault.jar=/Users/Admin/git/Bukkit_Library/Vault.jar +includes=** +jar.archive.disabled=${jnlp.enabled} +jar.compress=false +jar.index=${jnlp.enabled} +javac.classpath=\ + ${file.reference.craftbukkit-1.5pre-R0.1-SNAPSHOT.jar}:\ + ${file.reference.Vault.jar}:\ + ${file.reference.SimpleClans.jar}:\ + ${file.reference.chestshop.jar} +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +jnlp.codebase.type=no.codebase +jnlp.descriptor=application +jnlp.enabled=false +jnlp.mixed.code=default +jnlp.offline-allowed=false +jnlp.signed=false +jnlp.signing= +jnlp.signing.alias= +jnlp.signing.keystore= +main.class= +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=${file.reference.Secure-Chests-src} diff --git a/nbproject/project.xml b/nbproject/project.xml new file mode 100644 index 0000000..d4a7285 --- /dev/null +++ b/nbproject/project.xml @@ -0,0 +1,13 @@ + + + org.netbeans.modules.java.j2seproject + + + SecureChests + + + + + + +