-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added giveItem confirm message, added CIData
- Loading branch information
1 parent
13b183e
commit 00d67bb
Showing
13 changed files
with
108 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
78 changes: 78 additions & 0 deletions
78
src/main/java/org/strassburger/lifestealz/util/customitems/CustomItemData.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
package org.strassburger.lifestealz.util.customitems; | ||
|
||
import org.bukkit.Material; | ||
import org.strassburger.lifestealz.LifeStealZ; | ||
|
||
import java.util.List; | ||
|
||
public class CustomItemData { | ||
private final String itemId; | ||
private final String name; | ||
private final List<String> lore; | ||
private final Material material; | ||
private final boolean enchanted; | ||
private final int customModelData; | ||
private final String customItemType; | ||
private final int customHeartValue; | ||
private final boolean craftable; | ||
|
||
public CustomItemData(String itemId, String name, List<String> lore, Material material, boolean enchanted, int customModelData, String customItemType, int customHeartValue, boolean craftable) { | ||
this.itemId = itemId; | ||
this.name = name; | ||
this.lore = lore; | ||
this.material = material; | ||
this.enchanted = enchanted; | ||
this.customModelData = customModelData; | ||
this.customItemType = customItemType; | ||
this.customHeartValue = customHeartValue; | ||
this.craftable = craftable; | ||
} | ||
|
||
public CustomItemData(String itemId) { | ||
this.itemId = itemId; | ||
this.name = LifeStealZ.getInstance().getConfig().getString("items." + itemId + ".name"); | ||
this.lore = LifeStealZ.getInstance().getConfig().getStringList("items." + itemId + ".lore"); | ||
this.material = Material.valueOf(LifeStealZ.getInstance().getConfig().getString("items." + itemId + ".material")); | ||
this.enchanted = LifeStealZ.getInstance().getConfig().getBoolean("items." + itemId + ".enchanted"); | ||
this.customModelData = LifeStealZ.getInstance().getConfig().getInt("items." + itemId + ".customModelData"); | ||
this.customItemType = LifeStealZ.getInstance().getConfig().getString("items." + itemId + ".customItemType"); | ||
this.customHeartValue = LifeStealZ.getInstance().getConfig().getInt("items." + itemId + ".customHeartValue"); | ||
this.craftable = LifeStealZ.getInstance().getConfig().getBoolean("items." + itemId + ".craftable"); | ||
} | ||
|
||
public String getItemId() { | ||
return itemId; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public List<String> getLore() { | ||
return lore; | ||
} | ||
|
||
public Material getMaterial() { | ||
return material; | ||
} | ||
|
||
public boolean isEnchanted() { | ||
return enchanted; | ||
} | ||
|
||
public int getCustomModelData() { | ||
return customModelData; | ||
} | ||
|
||
public String getCustomItemType() { | ||
return customItemType; | ||
} | ||
|
||
public int getCustomHeartValue() { | ||
return customHeartValue; | ||
} | ||
|
||
public boolean isCraftable() { | ||
return craftable; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters