mirror of
https://github.com/Zrips/Jobs.git
synced 2024-11-29 14:05:25 +01:00
ArmorTypes from CMILib
This commit is contained in:
parent
3d429e7cb9
commit
3765c336bd
@ -22,7 +22,6 @@ import com.gamingmesh.jobs.container.JobsPlayer;
|
|||||||
import net.Zrips.CMILib.CMILib;
|
import net.Zrips.CMILib.CMILib;
|
||||||
import net.Zrips.CMILib.GUI.CMIGui;
|
import net.Zrips.CMILib.GUI.CMIGui;
|
||||||
import net.Zrips.CMILib.GUI.CMIGuiButton;
|
import net.Zrips.CMILib.GUI.CMIGuiButton;
|
||||||
import net.Zrips.CMILib.GUI.GUIManager;
|
|
||||||
import net.Zrips.CMILib.GUI.GUIManager.GUIClickType;
|
import net.Zrips.CMILib.GUI.GUIManager.GUIClickType;
|
||||||
|
|
||||||
public class GuiManager {
|
public class GuiManager {
|
||||||
|
@ -22,6 +22,7 @@ import com.gamingmesh.jobs.container.JobItems;
|
|||||||
import net.Zrips.CMILib.Colors.CMIChatColor;
|
import net.Zrips.CMILib.Colors.CMIChatColor;
|
||||||
import net.Zrips.CMILib.FileHandler.ConfigReader;
|
import net.Zrips.CMILib.FileHandler.ConfigReader;
|
||||||
import net.Zrips.CMILib.Items.CMIMaterial;
|
import net.Zrips.CMILib.Items.CMIMaterial;
|
||||||
|
import net.Zrips.CMILib.Logs.CMIDebug;
|
||||||
|
|
||||||
public class ItemBoostManager {
|
public class ItemBoostManager {
|
||||||
|
|
||||||
@ -227,6 +228,7 @@ public class ItemBoostManager {
|
|||||||
ITEMS.put(node, item);
|
ITEMS.put(node, item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Jobs.consoleMsg("&e[Jobs] Loaded " + ITEMS.size() + " boosted items!");
|
||||||
cfg.save();
|
cfg.save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,6 +64,7 @@ import com.gamingmesh.jobs.stuff.Util;
|
|||||||
import net.Zrips.CMILib.CMILib;
|
import net.Zrips.CMILib.CMILib;
|
||||||
import net.Zrips.CMILib.ActionBar.CMIActionBar;
|
import net.Zrips.CMILib.ActionBar.CMIActionBar;
|
||||||
import net.Zrips.CMILib.Items.CMIItemStack;
|
import net.Zrips.CMILib.Items.CMIItemStack;
|
||||||
|
import net.Zrips.CMILib.Logs.CMIDebug;
|
||||||
import net.Zrips.CMILib.NBT.CMINBT;
|
import net.Zrips.CMILib.NBT.CMINBT;
|
||||||
import net.Zrips.CMILib.Version.Version;
|
import net.Zrips.CMILib.Version.Version;
|
||||||
|
|
||||||
|
@ -1,52 +0,0 @@
|
|||||||
package com.gamingmesh.jobs.container;
|
|
||||||
|
|
||||||
import org.bukkit.inventory.ItemStack;
|
|
||||||
|
|
||||||
import net.Zrips.CMILib.Items.CMIMaterial;
|
|
||||||
|
|
||||||
public enum ArmorTypes {
|
|
||||||
HELMET(5), CHESTPLATE(6), LEGGINGS(7), BOOTS(8), ELYTRA(6);
|
|
||||||
|
|
||||||
private final int slot;
|
|
||||||
|
|
||||||
ArmorTypes(int slot) {
|
|
||||||
this.slot = slot;
|
|
||||||
}
|
|
||||||
|
|
||||||
public final static ArmorTypes matchType(final ItemStack itemStack) {
|
|
||||||
switch (CMIMaterial.get(itemStack)) {
|
|
||||||
case DIAMOND_HELMET:
|
|
||||||
case GOLDEN_HELMET:
|
|
||||||
case IRON_HELMET:
|
|
||||||
case CHAINMAIL_HELMET:
|
|
||||||
case LEATHER_HELMET:
|
|
||||||
return HELMET;
|
|
||||||
case DIAMOND_CHESTPLATE:
|
|
||||||
case GOLDEN_CHESTPLATE:
|
|
||||||
case IRON_CHESTPLATE:
|
|
||||||
case CHAINMAIL_CHESTPLATE:
|
|
||||||
case LEATHER_CHESTPLATE:
|
|
||||||
return CHESTPLATE;
|
|
||||||
case DIAMOND_LEGGINGS:
|
|
||||||
case GOLDEN_LEGGINGS:
|
|
||||||
case IRON_LEGGINGS:
|
|
||||||
case CHAINMAIL_LEGGINGS:
|
|
||||||
case LEATHER_LEGGINGS:
|
|
||||||
return LEGGINGS;
|
|
||||||
case DIAMOND_BOOTS:
|
|
||||||
case GOLDEN_BOOTS:
|
|
||||||
case IRON_BOOTS:
|
|
||||||
case CHAINMAIL_BOOTS:
|
|
||||||
case LEATHER_BOOTS:
|
|
||||||
return BOOTS;
|
|
||||||
case ELYTRA:
|
|
||||||
return ELYTRA;
|
|
||||||
default:
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getSlot() {
|
|
||||||
return slot;
|
|
||||||
}
|
|
||||||
}
|
|
@ -6,6 +6,8 @@ import org.bukkit.event.HandlerList;
|
|||||||
import org.bukkit.event.player.PlayerEvent;
|
import org.bukkit.event.player.PlayerEvent;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
|
import net.Zrips.CMILib.Items.ArmorTypes;
|
||||||
|
|
||||||
public final class JobsArmorChangeEvent extends PlayerEvent implements Cancellable {
|
public final class JobsArmorChangeEvent extends PlayerEvent implements Cancellable {
|
||||||
|
|
||||||
private static final HandlerList handlers = new HandlerList();
|
private static final HandlerList handlers = new HandlerList();
|
||||||
|
@ -71,7 +71,6 @@ import com.gamingmesh.jobs.Signs.SignUtil;
|
|||||||
import com.gamingmesh.jobs.Signs.jobsSign;
|
import com.gamingmesh.jobs.Signs.jobsSign;
|
||||||
import com.gamingmesh.jobs.api.JobsAreaSelectionEvent;
|
import com.gamingmesh.jobs.api.JobsAreaSelectionEvent;
|
||||||
import com.gamingmesh.jobs.api.JobsChunkChangeEvent;
|
import com.gamingmesh.jobs.api.JobsChunkChangeEvent;
|
||||||
import com.gamingmesh.jobs.container.ArmorTypes;
|
|
||||||
import com.gamingmesh.jobs.container.Job;
|
import com.gamingmesh.jobs.container.Job;
|
||||||
import com.gamingmesh.jobs.container.JobLimitedItems;
|
import com.gamingmesh.jobs.container.JobLimitedItems;
|
||||||
import com.gamingmesh.jobs.container.JobProgression;
|
import com.gamingmesh.jobs.container.JobProgression;
|
||||||
@ -81,6 +80,7 @@ import com.gamingmesh.jobs.container.JobsPlayer;
|
|||||||
|
|
||||||
import net.Zrips.CMILib.ActionBar.CMIActionBar;
|
import net.Zrips.CMILib.ActionBar.CMIActionBar;
|
||||||
import net.Zrips.CMILib.Colors.CMIChatColor;
|
import net.Zrips.CMILib.Colors.CMIChatColor;
|
||||||
|
import net.Zrips.CMILib.Items.ArmorTypes;
|
||||||
import net.Zrips.CMILib.Items.CMIItemStack;
|
import net.Zrips.CMILib.Items.CMIItemStack;
|
||||||
import net.Zrips.CMILib.Items.CMIMaterial;
|
import net.Zrips.CMILib.Items.CMIMaterial;
|
||||||
import net.Zrips.CMILib.Version.Version;
|
import net.Zrips.CMILib.Version.Version;
|
||||||
|
Loading…
Reference in New Issue
Block a user