mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2025-02-17 02:31:19 +01:00
Changed name to ChestShop
This commit is contained in:
parent
5e783fe430
commit
d5b791f8c8
@ -1,8 +1,8 @@
|
||||
package com.Acrobot.iConomyChestShop;
|
||||
package com.Acrobot.ChestShop;
|
||||
|
||||
import com.Acrobot.iConomyChestShop.Items.ItemName;
|
||||
import com.Acrobot.iConomyChestShop.Listeners.*;
|
||||
import com.Acrobot.iConomyChestShop.Utils.Config;
|
||||
import com.Acrobot.ChestShop.Items.ItemName;
|
||||
import com.Acrobot.ChestShop.Listeners.*;
|
||||
import com.Acrobot.ChestShop.Utils.Config;
|
||||
import org.bukkit.Server;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@ -16,7 +16,7 @@ import org.bukkit.plugin.java.JavaPlugin;
|
||||
* Main file of the plugin
|
||||
* @author Acrobot
|
||||
*/
|
||||
public class iConomyChestShop extends JavaPlugin {
|
||||
public class ChestShop extends JavaPlugin {
|
||||
|
||||
private final pluginEnable pluginEnable = new pluginEnable();
|
||||
private final blockBreak blockBreak = new blockBreak();
|
||||
@ -59,7 +59,7 @@ public class iConomyChestShop extends JavaPlugin {
|
||||
|
||||
//iCSversion
|
||||
if(commandName.equals("icsversion")){
|
||||
sender.sendMessage("iConomyChestShop's version is: " + desc.getVersion());
|
||||
sender.sendMessage("ChestShop's version is: " + desc.getVersion());
|
||||
return true;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.Acrobot.iConomyChestShop.Chests;
|
||||
package com.Acrobot.ChestShop.Chests;
|
||||
|
||||
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.block.Block;
|
@ -1,4 +1,4 @@
|
||||
package com.Acrobot.iConomyChestShop;
|
||||
package com.Acrobot.ChestShop;
|
||||
|
||||
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.inventory.ItemStack;
|
@ -1,4 +1,4 @@
|
||||
package com.Acrobot.iConomyChestShop.Items;
|
||||
package com.Acrobot.ChestShop.Items;
|
||||
|
||||
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;
|
||||
|
@ -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.Sign;
|
||||
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.iConomyChestShop.Protection.Security;
|
||||
import com.Acrobot.iConomyChestShop.Utils.Config;
|
||||
import com.Acrobot.iConomyChestShop.Utils.SignUtil;
|
||||
import com.Acrobot.ChestShop.Messaging.Message;
|
||||
import com.Acrobot.ChestShop.Protection.Security;
|
||||
import com.Acrobot.ChestShop.Utils.Config;
|
||||
import com.Acrobot.ChestShop.Utils.SignUtil;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
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.iConomyChestShop.Items.Odd;
|
||||
import com.Acrobot.iConomyChestShop.Permission;
|
||||
import com.Acrobot.iConomyChestShop.Protection.LWCplugin;
|
||||
import com.Acrobot.iConomyChestShop.Protection.LockettePlugin;
|
||||
import com.Acrobot.iConomyChestShop.Protection.Security;
|
||||
import com.Acrobot.iConomyChestShop.iConomyChestShop;
|
||||
import com.Acrobot.ChestShop.Economy;
|
||||
import com.Acrobot.ChestShop.Items.Odd;
|
||||
import com.Acrobot.ChestShop.Permission;
|
||||
import com.Acrobot.ChestShop.Protection.LWCplugin;
|
||||
import com.Acrobot.ChestShop.Protection.LockettePlugin;
|
||||
import com.Acrobot.ChestShop.Protection.Security;
|
||||
import com.Acrobot.ChestShop.ChestShop;
|
||||
import com.griefcraft.lwc.LWCPlugin;
|
||||
import com.nijikokun.bukkit.Permissions.Permissions;
|
||||
import com.nijikokun.register.payment.Methods;
|
||||
@ -28,53 +28,53 @@ public class pluginEnable extends ServerListener{
|
||||
if(!this.Methods.hasMethod()){
|
||||
if(this.Methods.setMethod(event.getPlugin())){
|
||||
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
|
||||
if (Permission.permissions == null) {
|
||||
Plugin permissions = iConomyChestShop.getBukkitServer().getPluginManager().getPlugin("Permissions");
|
||||
Plugin permissions = ChestShop.getBukkitServer().getPluginManager().getPlugin("Permissions");
|
||||
|
||||
if (permissions != null) {
|
||||
Permission.permissions = ((Permissions) permissions).getHandler();
|
||||
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
|
||||
if (LWCplugin.lwc == null) {
|
||||
Plugin lwcPlugin = iConomyChestShop.getBukkitServer().getPluginManager().getPlugin("LWC");
|
||||
Plugin lwcPlugin = ChestShop.getBukkitServer().getPluginManager().getPlugin("LWC");
|
||||
|
||||
if (lwcPlugin != null) {
|
||||
PluginDescriptionFile pDesc = lwcPlugin.getDescription();
|
||||
LWCplugin.lwc = ((LWCPlugin) lwcPlugin).getLWC();
|
||||
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
|
||||
if (Odd.oddItem == null) {
|
||||
Plugin oddItem = iConomyChestShop.getBukkitServer().getPluginManager().getPlugin("OddItem");
|
||||
Plugin oddItem = ChestShop.getBukkitServer().getPluginManager().getPlugin("OddItem");
|
||||
|
||||
if (oddItem != null) {
|
||||
PluginDescriptionFile pDesc = oddItem.getDescription();
|
||||
Odd.oddItem = (OddItem) iConomyChestShop.getBukkitServer().getPluginManager().getPlugin("OddItem");
|
||||
System.out.println("[iConomyChestShop] " + pDesc.getName() + " version " + pDesc.getVersion() + " loaded.");
|
||||
Odd.oddItem = (OddItem) ChestShop.getBukkitServer().getPluginManager().getPlugin("OddItem");
|
||||
System.out.println("[ChestShop] " + pDesc.getName() + " version " + pDesc.getVersion() + " loaded.");
|
||||
}
|
||||
}
|
||||
|
||||
//Lockette
|
||||
if (LockettePlugin.lockette == null) {
|
||||
Plugin lockette = iConomyChestShop.getBukkitServer().getPluginManager().getPlugin("Lockette");
|
||||
Plugin lockette = ChestShop.getBukkitServer().getPluginManager().getPlugin("Lockette");
|
||||
|
||||
if (lockette != null) {
|
||||
PluginDescriptionFile pDesc = lockette.getDescription();
|
||||
LockettePlugin.lockette = ((Lockette) lockette);
|
||||
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;
|
||||
|
10
com/Acrobot/ChestShop/Logging/Logging.java
Normal file
10
com/Acrobot/ChestShop/Logging/Logging.java
Normal file
@ -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;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.Acrobot.iConomyChestShop;
|
||||
package com.Acrobot.ChestShop;
|
||||
|
||||
import com.nijiko.permissions.PermissionHandler;
|
||||
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.entity.Player;
|
@ -1,4 +1,4 @@
|
||||
package com.Acrobot.iConomyChestShop.Protection;
|
||||
package com.Acrobot.ChestShop.Protection;
|
||||
|
||||
import com.griefcraft.lwc.LWC;
|
||||
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.entity.Player;
|
@ -1,4 +1,4 @@
|
||||
package com.Acrobot.iConomyChestShop.Protection;
|
||||
package com.Acrobot.ChestShop.Protection;
|
||||
|
||||
|
||||
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.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.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 java.io.File;
|
||||
@ -9,7 +9,7 @@ import java.io.File;
|
||||
* @author Acrobot
|
||||
*/
|
||||
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);
|
||||
|
||||
|
||||
@ -34,6 +34,10 @@ public class Config {
|
||||
return config.getBoolean(node, false);
|
||||
}
|
||||
|
||||
public static String getString(String node){
|
||||
return config.getString(node, "");
|
||||
}
|
||||
|
||||
public static int getInteger(String node){
|
||||
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
|
41
com/Acrobot/ChestShop/Utils/SearchForBlock.java
Normal file
41
com/Acrobot/ChestShop/Utils/SearchForBlock.java
Normal file
@ -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.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
|
||||
version: 3.00
|
||||
|
Loading…
Reference in New Issue
Block a user