Skip to content

Commit

Permalink
Removed GUIs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Spikey84 committed May 10, 2024
1 parent a3175ed commit 38d76dd
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 270 deletions.
81 changes: 0 additions & 81 deletions src/main/java/com/gmail/justbru00/epic/rename/spikeyutils/I.java

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import java.util.ArrayList;
import java.util.List;

import com.gmail.justbru00.epic.rename.spikeyutils.inventory.ConfirmInventory;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.entity.Player;
Expand Down Expand Up @@ -225,39 +224,24 @@ public static void loreHandle(String[] args, Player player) {


if (Main.USE_NEW_GET_HAND) { // Use 1.9+ method
new ConfirmInventory(Main.plugin, "Set Lore", player, (b) -> {
if (b) {
ItemStack iH = RenameUtil.getInHand(player);
ItemStack toLore = iH.clone();
ItemMeta toLoreMeta = toLore.getItemMeta();
toLoreMeta.setLore(LoreUtil.buildLoreFromArgs(args, true));
toLore.setItemMeta(toLoreMeta);
iH.setAmount(0);
player.getInventory().setItemInMainHand(toLore);
Main.cooldownAPI.updateCooldown(player, 6);
Messager.msgPlayer(Main.getMsgFromConfig("lore.success"), player);
} else {
player.sendMessage("Lore not applied.");
}
}).open(player);
return;
ItemStack toLore = inHand.clone();
ItemMeta toLoreMeta = toLore.getItemMeta();
toLoreMeta.setLore(LoreUtil.buildLoreFromArgs(args, true));
toLore.setItemMeta(toLoreMeta);
inHand.setAmount(0);
player.getInventory().setItemInMainHand(toLore);
Main.cooldownAPI.updateCooldown(player, 6);
Messager.msgPlayer(Main.getMsgFromConfig("lore.success"), player);
} else { // Use older method.
new ConfirmInventory(Main.plugin, "Set Lore", player, (b) -> {
if (b) {
ItemStack iH = RenameUtil.getInHand(player);
ItemStack toLore = iH.clone();
ItemMeta toLoreMeta = toLore.getItemMeta();
toLoreMeta.setLore(LoreUtil.buildLoreFromArgs(args, true));
toLore.setItemMeta(toLoreMeta);
iH.setAmount(0);
player.setItemInHand(toLore);
Main.cooldownAPI.updateCooldown(player, 6);
Messager.msgPlayer(Main.getMsgFromConfig("lore.success"), player);
} else {
player.sendMessage("Lore not applied.");
}
}).open(player);
return;
ItemStack iH = RenameUtil.getInHand(player);
ItemStack toLore = iH.clone();
ItemMeta toLoreMeta = toLore.getItemMeta();
toLoreMeta.setLore(LoreUtil.buildLoreFromArgs(args, true));
toLore.setItemMeta(toLoreMeta);
iH.setAmount(0);
player.setItemInHand(toLore);
Main.cooldownAPI.updateCooldown(player, 6);
Messager.msgPlayer(Main.getMsgFromConfig("lore.success"), player);
}

} else {
Expand Down

0 comments on commit 38d76dd

Please sign in to comment.