Cleaned up enchantment system.

This commit is contained in:
Brianna O'Keefe 2019-01-19 08:55:06 -05:00
parent 60a467a201
commit 555609309a
2 changed files with 8 additions and 8 deletions

View File

@ -14,7 +14,7 @@ import com.songoda.epichoppers.api.utils.ProtectionPluginHook;
import com.songoda.epichoppers.boost.BoostData; import com.songoda.epichoppers.boost.BoostData;
import com.songoda.epichoppers.boost.BoostManager; import com.songoda.epichoppers.boost.BoostManager;
import com.songoda.epichoppers.command.CommandManager; import com.songoda.epichoppers.command.CommandManager;
import com.songoda.epichoppers.handlers.EnchantmentHandler; import com.songoda.epichoppers.enchantment.Enchantment;
import com.songoda.epichoppers.handlers.HopHandler; import com.songoda.epichoppers.handlers.HopHandler;
import com.songoda.epichoppers.handlers.TeleportHandler; import com.songoda.epichoppers.handlers.TeleportHandler;
import com.songoda.epichoppers.hooks.*; import com.songoda.epichoppers.hooks.*;
@ -67,7 +67,7 @@ public class EpicHoppersPlugin extends JavaPlugin implements EpicHoppers {
private static EpicHoppersPlugin INSTANCE; private static EpicHoppersPlugin INSTANCE;
public References references = null; public References references = null;
public EnchantmentHandler enchantmentHandler; public Enchantment enchantmentHandler;
private List<ProtectionPluginHook> protectionHooks = new ArrayList<>(); private List<ProtectionPluginHook> protectionHooks = new ArrayList<>();
private ClaimableProtectionPluginHook factionsHook, townyHook, aSkyblockHook, uSkyblockHook, skyBlockEarhHook; private ClaimableProtectionPluginHook factionsHook, townyHook, aSkyblockHook, uSkyblockHook, skyBlockEarhHook;
private SettingsManager settingsManager; private SettingsManager settingsManager;
@ -130,7 +130,7 @@ public class EpicHoppersPlugin extends JavaPlugin implements EpicHoppers {
this.update(); this.update();
} }
this.enchantmentHandler = new EnchantmentHandler(); this.enchantmentHandler = new Enchantment();
this.hopperManager = new EHopperManager(); this.hopperManager = new EHopperManager();
this.playerDataManager = new PlayerDataManager(); this.playerDataManager = new PlayerDataManager();
this.boostManager = new BoostManager(); this.boostManager = new BoostManager();

View File

@ -1,4 +1,4 @@
package com.songoda.epichoppers.handlers; package com.songoda.epichoppers.enchantment;
import com.songoda.epichoppers.utils.Debugger; import com.songoda.epichoppers.utils.Debugger;
import com.songoda.epichoppers.utils.Methods; import com.songoda.epichoppers.utils.Methods;
@ -12,15 +12,15 @@ import java.util.ArrayList;
/** /**
* Created by songoda on 3/22/2017. * Created by songoda on 3/22/2017.
*/ */
public class EnchantmentHandler { public class Enchantment {
public ItemStack createSyncTouch(ItemStack item, Block b) { public ItemStack createSyncTouch(ItemStack item, Block block) {
try { try {
ItemMeta itemmeta = item.getItemMeta(); ItemMeta itemmeta = item.getItemMeta();
ArrayList<String> lore = new ArrayList<>(); ArrayList<String> lore = new ArrayList<>();
if (b != null) { if (block != null) {
lore.add(Methods.formatText("&aSync Touch")); lore.add(Methods.formatText("&aSync Touch"));
lore.add(Methods.convertToInvisibleString(Methods.serializeLocation(b))); lore.add(Methods.convertToInvisibleString(Methods.serializeLocation(block)));
} else { } else {
lore.add(Methods.formatText("&7Sync Touch")); lore.add(Methods.formatText("&7Sync Touch"));
} }