Changed name to ChestShop
This commit is contained in:
parent
5e783fe430
commit
d5b791f8c8
2
README
2
README
|
@ -1,4 +1,4 @@
|
||||||
iConomyChestShop
|
ChestShop
|
||||||
|
|
||||||
Shop plugin for Bukkit
|
Shop plugin for Bukkit
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package com.Acrobot.iConomyChestShop;
|
package com.Acrobot.ChestShop;
|
||||||
|
|
||||||
import com.Acrobot.iConomyChestShop.Items.ItemName;
|
import com.Acrobot.ChestShop.Items.ItemName;
|
||||||
import com.Acrobot.iConomyChestShop.Listeners.*;
|
import com.Acrobot.ChestShop.Listeners.*;
|
||||||
import com.Acrobot.iConomyChestShop.Utils.Config;
|
import com.Acrobot.ChestShop.Utils.Config;
|
||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
@ -16,7 +16,7 @@ import org.bukkit.plugin.java.JavaPlugin;
|
||||||
* Main file of the plugin
|
* Main file of the plugin
|
||||||
* @author Acrobot
|
* @author Acrobot
|
||||||
*/
|
*/
|
||||||
public class iConomyChestShop extends JavaPlugin {
|
public class ChestShop extends JavaPlugin {
|
||||||
|
|
||||||
private final pluginEnable pluginEnable = new pluginEnable();
|
private final pluginEnable pluginEnable = new pluginEnable();
|
||||||
private final blockBreak blockBreak = new blockBreak();
|
private final blockBreak blockBreak = new blockBreak();
|
||||||
|
@ -59,7 +59,7 @@ public class iConomyChestShop extends JavaPlugin {
|
||||||
|
|
||||||
//iCSversion
|
//iCSversion
|
||||||
if(commandName.equals("icsversion")){
|
if(commandName.equals("icsversion")){
|
||||||
sender.sendMessage("iConomyChestShop's version is: " + desc.getVersion());
|
sender.sendMessage("ChestShop's version is: " + desc.getVersion());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package com.Acrobot.iConomyChestShop.Chests;
|
package com.Acrobot.ChestShop.Chests;
|
||||||
|
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package com.Acrobot.iConomyChestShop.Chests;
|
package com.Acrobot.ChestShop.Chests;
|
||||||
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.Acrobot.iConomyChestShop;
|
package com.Acrobot.ChestShop;
|
||||||
|
|
||||||
import com.nijikokun.register.payment.Method;
|
import com.nijikokun.register.payment.Method;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package com.Acrobot.iConomyChestShop.Items;
|
package com.Acrobot.ChestShop.Items;
|
||||||
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.Acrobot.iConomyChestShop.Items;
|
package com.Acrobot.ChestShop.Items;
|
||||||
|
|
||||||
import info.somethingodd.bukkit.odd.item.OddItem;
|
import info.somethingodd.bukkit.odd.item.OddItem;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package com.Acrobot.iConomyChestShop.Listeners;
|
package com.Acrobot.ChestShop.Listeners;
|
||||||
|
|
||||||
import org.bukkit.event.block.BlockListener;
|
import org.bukkit.event.block.BlockListener;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package com.Acrobot.iConomyChestShop.Listeners;
|
package com.Acrobot.ChestShop.Listeners;
|
||||||
|
|
||||||
import com.Acrobot.iConomyChestShop.Utils.SignUtil;
|
import com.Acrobot.ChestShop.Utils.SignUtil;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.block.Sign;
|
import org.bukkit.block.Sign;
|
||||||
import org.bukkit.event.block.BlockListener;
|
import org.bukkit.event.block.BlockListener;
|
|
@ -1,9 +1,9 @@
|
||||||
package com.Acrobot.iConomyChestShop.Listeners;
|
package com.Acrobot.ChestShop.Listeners;
|
||||||
|
|
||||||
import com.Acrobot.iConomyChestShop.Messaging.Message;
|
import com.Acrobot.ChestShop.Messaging.Message;
|
||||||
import com.Acrobot.iConomyChestShop.Protection.Security;
|
import com.Acrobot.ChestShop.Protection.Security;
|
||||||
import com.Acrobot.iConomyChestShop.Utils.Config;
|
import com.Acrobot.ChestShop.Utils.Config;
|
||||||
import com.Acrobot.iConomyChestShop.Utils.SignUtil;
|
import com.Acrobot.ChestShop.Utils.SignUtil;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.block.Sign;
|
import org.bukkit.block.Sign;
|
|
@ -1,12 +1,12 @@
|
||||||
package com.Acrobot.iConomyChestShop.Listeners;
|
package com.Acrobot.ChestShop.Listeners;
|
||||||
|
|
||||||
import com.Acrobot.iConomyChestShop.Economy;
|
import com.Acrobot.ChestShop.Economy;
|
||||||
import com.Acrobot.iConomyChestShop.Items.Odd;
|
import com.Acrobot.ChestShop.Items.Odd;
|
||||||
import com.Acrobot.iConomyChestShop.Permission;
|
import com.Acrobot.ChestShop.Permission;
|
||||||
import com.Acrobot.iConomyChestShop.Protection.LWCplugin;
|
import com.Acrobot.ChestShop.Protection.LWCplugin;
|
||||||
import com.Acrobot.iConomyChestShop.Protection.LockettePlugin;
|
import com.Acrobot.ChestShop.Protection.LockettePlugin;
|
||||||
import com.Acrobot.iConomyChestShop.Protection.Security;
|
import com.Acrobot.ChestShop.Protection.Security;
|
||||||
import com.Acrobot.iConomyChestShop.iConomyChestShop;
|
import com.Acrobot.ChestShop.ChestShop;
|
||||||
import com.griefcraft.lwc.LWCPlugin;
|
import com.griefcraft.lwc.LWCPlugin;
|
||||||
import com.nijikokun.bukkit.Permissions.Permissions;
|
import com.nijikokun.bukkit.Permissions.Permissions;
|
||||||
import com.nijikokun.register.payment.Methods;
|
import com.nijikokun.register.payment.Methods;
|
||||||
|
@ -28,53 +28,53 @@ public class pluginEnable extends ServerListener{
|
||||||
if(!this.Methods.hasMethod()){
|
if(!this.Methods.hasMethod()){
|
||||||
if(this.Methods.setMethod(event.getPlugin())){
|
if(this.Methods.setMethod(event.getPlugin())){
|
||||||
Economy.economy = this.Methods.getMethod();
|
Economy.economy = this.Methods.getMethod();
|
||||||
System.out.println("[iConomyChestShop] " + Economy.economy.getName() + " " + Economy.economy.getVersion() + " loaded.");
|
System.out.println("[ChestShop] " + Economy.economy.getName() + " " + Economy.economy.getVersion() + " loaded.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Permissions
|
//Permissions
|
||||||
if (Permission.permissions == null) {
|
if (Permission.permissions == null) {
|
||||||
Plugin permissions = iConomyChestShop.getBukkitServer().getPluginManager().getPlugin("Permissions");
|
Plugin permissions = ChestShop.getBukkitServer().getPluginManager().getPlugin("Permissions");
|
||||||
|
|
||||||
if (permissions != null) {
|
if (permissions != null) {
|
||||||
Permission.permissions = ((Permissions) permissions).getHandler();
|
Permission.permissions = ((Permissions) permissions).getHandler();
|
||||||
PluginDescriptionFile pDesc = permissions.getDescription();
|
PluginDescriptionFile pDesc = permissions.getDescription();
|
||||||
System.out.println("[iConomyChestShop] " + pDesc.getName() + " version " + pDesc.getVersion() + " loaded.");
|
System.out.println("[ChestShop] " + pDesc.getName() + " version " + pDesc.getVersion() + " loaded.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//LWC
|
//LWC
|
||||||
if (LWCplugin.lwc == null) {
|
if (LWCplugin.lwc == null) {
|
||||||
Plugin lwcPlugin = iConomyChestShop.getBukkitServer().getPluginManager().getPlugin("LWC");
|
Plugin lwcPlugin = ChestShop.getBukkitServer().getPluginManager().getPlugin("LWC");
|
||||||
|
|
||||||
if (lwcPlugin != null) {
|
if (lwcPlugin != null) {
|
||||||
PluginDescriptionFile pDesc = lwcPlugin.getDescription();
|
PluginDescriptionFile pDesc = lwcPlugin.getDescription();
|
||||||
LWCplugin.lwc = ((LWCPlugin) lwcPlugin).getLWC();
|
LWCplugin.lwc = ((LWCPlugin) lwcPlugin).getLWC();
|
||||||
Security.protection = new LWCplugin();
|
Security.protection = new LWCplugin();
|
||||||
System.out.println("[iConomyChestShop] " + pDesc.getName() + " version " + pDesc.getVersion() + " loaded.");
|
System.out.println("[ChestShop] " + pDesc.getName() + " version " + pDesc.getVersion() + " loaded.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//OddItem
|
//OddItem
|
||||||
if (Odd.oddItem == null) {
|
if (Odd.oddItem == null) {
|
||||||
Plugin oddItem = iConomyChestShop.getBukkitServer().getPluginManager().getPlugin("OddItem");
|
Plugin oddItem = ChestShop.getBukkitServer().getPluginManager().getPlugin("OddItem");
|
||||||
|
|
||||||
if (oddItem != null) {
|
if (oddItem != null) {
|
||||||
PluginDescriptionFile pDesc = oddItem.getDescription();
|
PluginDescriptionFile pDesc = oddItem.getDescription();
|
||||||
Odd.oddItem = (OddItem) iConomyChestShop.getBukkitServer().getPluginManager().getPlugin("OddItem");
|
Odd.oddItem = (OddItem) ChestShop.getBukkitServer().getPluginManager().getPlugin("OddItem");
|
||||||
System.out.println("[iConomyChestShop] " + pDesc.getName() + " version " + pDesc.getVersion() + " loaded.");
|
System.out.println("[ChestShop] " + pDesc.getName() + " version " + pDesc.getVersion() + " loaded.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Lockette
|
//Lockette
|
||||||
if (LockettePlugin.lockette == null) {
|
if (LockettePlugin.lockette == null) {
|
||||||
Plugin lockette = iConomyChestShop.getBukkitServer().getPluginManager().getPlugin("Lockette");
|
Plugin lockette = ChestShop.getBukkitServer().getPluginManager().getPlugin("Lockette");
|
||||||
|
|
||||||
if (lockette != null) {
|
if (lockette != null) {
|
||||||
PluginDescriptionFile pDesc = lockette.getDescription();
|
PluginDescriptionFile pDesc = lockette.getDescription();
|
||||||
LockettePlugin.lockette = ((Lockette) lockette);
|
LockettePlugin.lockette = ((Lockette) lockette);
|
||||||
Security.protection = new LockettePlugin();
|
Security.protection = new LockettePlugin();
|
||||||
System.out.println("[iConomyChestShop] " + pDesc.getName() + " version " + pDesc.getVersion() + " loaded.");
|
System.out.println("[ChestShop] " + pDesc.getName() + " version " + pDesc.getVersion() + " loaded.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package com.Acrobot.iConomyChestShop.Listeners;
|
package com.Acrobot.ChestShop.Listeners;
|
||||||
|
|
||||||
import org.bukkit.event.block.BlockListener;
|
import org.bukkit.event.block.BlockListener;
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
package com.Acrobot.ChestShop.Logging;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Acrobot
|
||||||
|
*/
|
||||||
|
public class Logging {
|
||||||
|
public static void log(String string){
|
||||||
|
System.out.println("[ChestShop] " + string);
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package com.Acrobot.iConomyChestShop.Messaging;
|
package com.Acrobot.ChestShop.Messaging;
|
||||||
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package com.Acrobot.iConomyChestShop;
|
package com.Acrobot.ChestShop;
|
||||||
|
|
||||||
import com.nijiko.permissions.PermissionHandler;
|
import com.nijiko.permissions.PermissionHandler;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.Acrobot.iConomyChestShop.Protection;
|
package com.Acrobot.ChestShop.Protection;
|
||||||
|
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.Acrobot.iConomyChestShop.Protection;
|
package com.Acrobot.ChestShop.Protection;
|
||||||
|
|
||||||
import com.griefcraft.lwc.LWC;
|
import com.griefcraft.lwc.LWC;
|
||||||
import com.griefcraft.model.ProtectionTypes;
|
import com.griefcraft.model.ProtectionTypes;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.Acrobot.iConomyChestShop.Protection;
|
package com.Acrobot.ChestShop.Protection;
|
||||||
|
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.Acrobot.iConomyChestShop.Protection;
|
package com.Acrobot.ChestShop.Protection;
|
||||||
|
|
||||||
|
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
|
@ -1,4 +1,4 @@
|
||||||
package com.Acrobot.iConomyChestShop.Protection;
|
package com.Acrobot.ChestShop.Protection;
|
||||||
|
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
|
@ -1,6 +1,6 @@
|
||||||
package com.Acrobot.iConomyChestShop.Shop;
|
package com.Acrobot.ChestShop.Shop;
|
||||||
|
|
||||||
import com.Acrobot.iConomyChestShop.Chests.ChestObject;
|
import com.Acrobot.ChestShop.Chests.ChestObject;
|
||||||
import org.bukkit.block.Sign;
|
import org.bukkit.block.Sign;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package com.Acrobot.iConomyChestShop.Utils;
|
package com.Acrobot.ChestShop.Utils;
|
||||||
|
|
||||||
import com.Acrobot.iConomyChestShop.Logging.Logging;
|
import com.Acrobot.ChestShop.Logging.Logging;
|
||||||
import org.bukkit.util.config.Configuration;
|
import org.bukkit.util.config.Configuration;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
@ -9,7 +9,7 @@ import java.io.File;
|
||||||
* @author Acrobot
|
* @author Acrobot
|
||||||
*/
|
*/
|
||||||
public class Config {
|
public class Config {
|
||||||
private static File configFile = new File("plugins/iConomyChestShop/config.yml");
|
private static File configFile = new File("plugins/ChestShop/config.yml");
|
||||||
private static Configuration config = new Configuration(configFile);
|
private static Configuration config = new Configuration(configFile);
|
||||||
|
|
||||||
|
|
||||||
|
@ -34,6 +34,10 @@ public class Config {
|
||||||
return config.getBoolean(node, false);
|
return config.getBoolean(node, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String getString(String node){
|
||||||
|
return config.getString(node, "");
|
||||||
|
}
|
||||||
|
|
||||||
public static int getInteger(String node){
|
public static int getInteger(String node){
|
||||||
return config.getInt(node, 0);
|
return config.getInt(node, 0);
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package com.Acrobot.iConomyChestShop.Utils;
|
package com.Acrobot.ChestShop.Utils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if string is a numerical value
|
* Checks if string is a numerical value
|
|
@ -0,0 +1,41 @@
|
||||||
|
package com.Acrobot.ChestShop.Utils;
|
||||||
|
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.block.Block;
|
||||||
|
import org.bukkit.block.BlockFace;
|
||||||
|
import org.bukkit.block.Chest;
|
||||||
|
import org.bukkit.block.Sign;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Acrobot
|
||||||
|
*/
|
||||||
|
public class SearchForBlock {
|
||||||
|
|
||||||
|
public static Chest findChest(Sign sign){
|
||||||
|
Block block = sign.getBlock();
|
||||||
|
return findChest(block);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Chest findChest(Block block){
|
||||||
|
for(BlockFace bf : BlockFace.values()){
|
||||||
|
Block faceBlock = block.getFace(bf);
|
||||||
|
if(faceBlock.getType() == Material.CHEST){
|
||||||
|
return (Chest) faceBlock.getState();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Sign findSign(Block block){
|
||||||
|
for(BlockFace bf : BlockFace.values()){
|
||||||
|
Block faceBlock = block.getFace(bf);
|
||||||
|
if(SignUtil.isSign(faceBlock)){
|
||||||
|
Sign sign = (Sign) faceBlock;
|
||||||
|
if(SignUtil.isValid(sign)){
|
||||||
|
return sign;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package com.Acrobot.iConomyChestShop.Utils;
|
package com.Acrobot.ChestShop.Utils;
|
||||||
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
|
@ -1,10 +0,0 @@
|
||||||
package com.Acrobot.iConomyChestShop.Logging;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author Acrobot
|
|
||||||
*/
|
|
||||||
public class Logging {
|
|
||||||
public static void log(String string){
|
|
||||||
System.out.println("[iConomyChestShop] " + string);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,13 +0,0 @@
|
||||||
package com.Acrobot.iConomyChestShop.Utils;
|
|
||||||
|
|
||||||
import org.bukkit.block.Chest;
|
|
||||||
import org.bukkit.block.Sign;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author Acrobot
|
|
||||||
*/
|
|
||||||
public class SearchForBlock {
|
|
||||||
public static Chest findChest(Sign sign){
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,6 +1,6 @@
|
||||||
name: iConomyChestShop
|
name: ChestShop
|
||||||
|
|
||||||
main: com.Acrobot.iConomyChestShop.iConomyChestShop
|
main: com.Acrobot.ChestShop.ChestShop
|
||||||
|
|
||||||
database: true
|
database: true
|
||||||
version: 3.00
|
version: 3.00
|
||||||
|
|
Loading…
Reference in New Issue