Compare commits
No commits in common. "814d7adea7e850de47ec516f9b4938593d41f7da" and "1dbb199258b6e920e1f843638aa891c93bccc14b" have entirely different histories.
814d7adea7
...
1dbb199258
8 changed files with 1 additions and 100 deletions
|
@ -2,9 +2,6 @@
|
||||||
[FEATURES]
|
[FEATURES]
|
||||||
- Players are now able to mark disguises as favorites.
|
- Players are now able to mark disguises as favorites.
|
||||||
|
|
||||||
[FIXES]
|
|
||||||
- Added a missing sound when players undisguised.
|
|
||||||
|
|
||||||
1.2.0-RC1: Update n°12 (XX/XX/25)
|
1.2.0-RC1: Update n°12 (XX/XX/25)
|
||||||
[FEATURES]
|
[FEATURES]
|
||||||
- Updated to support Minecraft 1.21.5.
|
- Updated to support Minecraft 1.21.5.
|
||||||
|
|
|
@ -1,44 +0,0 @@
|
||||||
package xyz.ineanto.nicko.gui;
|
|
||||||
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
import xyz.ineanto.nicko.gui.items.common.GoBackItem;
|
|
||||||
import xyz.ineanto.nicko.language.LanguageKey;
|
|
||||||
import xyz.ineanto.nicko.language.PlayerLanguage;
|
|
||||||
import xyz.xenondevs.invui.gui.Gui;
|
|
||||||
import xyz.xenondevs.invui.window.Window;
|
|
||||||
|
|
||||||
public class FavoritesGUI {
|
|
||||||
private final Player player;
|
|
||||||
private final Gui gui;
|
|
||||||
private final String title;
|
|
||||||
|
|
||||||
public FavoritesGUI(Player player) {
|
|
||||||
final PlayerLanguage playerLanguage = new PlayerLanguage(player);
|
|
||||||
this.title = playerLanguage.translate(LanguageKey.GUI.Titles.FAVORITES, false);
|
|
||||||
|
|
||||||
final HomeGUI parent = new HomeGUI(player);
|
|
||||||
final GoBackItem backItem = new GoBackItem(player);
|
|
||||||
|
|
||||||
this.gui = Gui.normal()
|
|
||||||
.setStructure(
|
|
||||||
"# # # # # # # # #",
|
|
||||||
"# # # S C E # # #",
|
|
||||||
"B # # # # # # # #"
|
|
||||||
)
|
|
||||||
.addIngredient('B', backItem.get(parent.getGUI(), parent.getTitle()))
|
|
||||||
.build();
|
|
||||||
this.player = player;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Gui getGUI() {
|
|
||||||
return gui;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTitle() {
|
|
||||||
return title;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void open() {
|
|
||||||
Window.single().setGui(gui).setTitle(title).open(player);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -19,7 +19,7 @@ public class HomeGUI {
|
||||||
final String[] dynamicStructure = new String[]{
|
final String[] dynamicStructure = new String[]{
|
||||||
"# # # # D # # # #",
|
"# # # # D # # # #",
|
||||||
"A # # N B S # # #",
|
"A # # N B S # # #",
|
||||||
"E P # # F # # # R"};
|
"E P # # # # # # R"};
|
||||||
|
|
||||||
if (!player.isOp() || !player.hasPermission("nicko.admin")) {
|
if (!player.isOp() || !player.hasPermission("nicko.admin")) {
|
||||||
dynamicStructure[2] = dynamicStructure[2].replace("A", "#");
|
dynamicStructure[2] = dynamicStructure[2].replace("A", "#");
|
||||||
|
@ -36,7 +36,6 @@ public class HomeGUI {
|
||||||
final SettingsAccessItem settingsAccessItem = new SettingsAccessItem(player);
|
final SettingsAccessItem settingsAccessItem = new SettingsAccessItem(player);
|
||||||
final AdminAccessItem adminAccessItem = new AdminAccessItem(player);
|
final AdminAccessItem adminAccessItem = new AdminAccessItem(player);
|
||||||
final RandomSkinItem randomSkinItem = new RandomSkinItem(player);
|
final RandomSkinItem randomSkinItem = new RandomSkinItem(player);
|
||||||
final FavoritesItem favoritesItem = new FavoritesItem(player);
|
|
||||||
|
|
||||||
this.gui = Gui.normal()
|
this.gui = Gui.normal()
|
||||||
.setStructure(dynamicStructure)
|
.setStructure(dynamicStructure)
|
||||||
|
@ -48,7 +47,6 @@ public class HomeGUI {
|
||||||
.addIngredient('P', settingsAccessItem.get())
|
.addIngredient('P', settingsAccessItem.get())
|
||||||
.addIngredient('A', adminAccessItem.get())
|
.addIngredient('A', adminAccessItem.get())
|
||||||
.addIngredient('D', randomSkinItem.get())
|
.addIngredient('D', randomSkinItem.get())
|
||||||
.addIngredient('F', favoritesItem.get())
|
|
||||||
.build();
|
.build();
|
||||||
this.player = player;
|
this.player = player;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,36 +0,0 @@
|
||||||
package xyz.ineanto.nicko.gui.items.home;
|
|
||||||
|
|
||||||
import org.bukkit.Material;
|
|
||||||
import org.bukkit.Sound;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
import org.bukkit.event.inventory.ClickType;
|
|
||||||
import xyz.ineanto.nicko.gui.FavoritesGUI;
|
|
||||||
import xyz.ineanto.nicko.language.LanguageKey;
|
|
||||||
import xyz.ineanto.nicko.language.PlayerLanguage;
|
|
||||||
import xyz.xenondevs.invui.item.builder.ItemBuilder;
|
|
||||||
import xyz.xenondevs.invui.item.impl.SuppliedItem;
|
|
||||||
|
|
||||||
public class FavoritesItem {
|
|
||||||
private final PlayerLanguage playerLanguage;
|
|
||||||
|
|
||||||
public FavoritesItem(Player player) {
|
|
||||||
this.playerLanguage = new PlayerLanguage(player);
|
|
||||||
}
|
|
||||||
|
|
||||||
public SuppliedItem get() {
|
|
||||||
return new SuppliedItem(() -> {
|
|
||||||
final ItemBuilder builder = new ItemBuilder(Material.CHEST);
|
|
||||||
return playerLanguage.translateItem(builder, LanguageKey.GUI.Home.FAVORITES);
|
|
||||||
}, click -> {
|
|
||||||
final Player player = click.getPlayer();
|
|
||||||
final ClickType clickType = click.getClickType();
|
|
||||||
if (clickType.isLeftClick() || clickType.isRightClick()) {
|
|
||||||
click.getEvent().getView().close();
|
|
||||||
new FavoritesGUI(click.getPlayer()).open();
|
|
||||||
player.playSound(player.getLocation(), Sound.BLOCK_CHEST_OPEN, 1, 1f);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,7 +1,6 @@
|
||||||
package xyz.ineanto.nicko.gui.items.home;
|
package xyz.ineanto.nicko.gui.items.home;
|
||||||
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.Sound;
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.inventory.ClickType;
|
import org.bukkit.event.inventory.ClickType;
|
||||||
import xyz.ineanto.nicko.appearance.AppearanceManager;
|
import xyz.ineanto.nicko.appearance.AppearanceManager;
|
||||||
|
@ -41,7 +40,6 @@ public class ResetItem {
|
||||||
player.sendMessage(playerLanguage.translateWithWhoosh(LanguageKey.Event.Appearance.Remove.OK));
|
player.sendMessage(playerLanguage.translateWithWhoosh(LanguageKey.Event.Appearance.Remove.OK));
|
||||||
} else {
|
} else {
|
||||||
player.sendMessage(playerLanguage.translateWithOops(LanguageKey.Event.Appearance.Remove.ERROR));
|
player.sendMessage(playerLanguage.translateWithOops(LanguageKey.Event.Appearance.Remove.ERROR));
|
||||||
player.playSound(player.getLocation(), Sound.ENTITY_VILLAGER_NO, 1, 1f);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -92,7 +92,6 @@ public class LanguageKey {
|
||||||
public static final String CONFIRM = TITLE_KEY + "confirm";
|
public static final String CONFIRM = TITLE_KEY + "confirm";
|
||||||
public static final String CACHE = TITLE_KEY + "cache";
|
public static final String CACHE = TITLE_KEY + "cache";
|
||||||
public static final String INVALIDATE_SKIN = TITLE_KEY + "invalidate_skin";
|
public static final String INVALIDATE_SKIN = TITLE_KEY + "invalidate_skin";
|
||||||
public static final String FAVORITES = TITLE_KEY + "favorites";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Choice {
|
public static class Choice {
|
||||||
|
@ -113,7 +112,6 @@ public class LanguageKey {
|
||||||
public static final String RESET = HOME_KEY + "reset";
|
public static final String RESET = HOME_KEY + "reset";
|
||||||
public static final String RANDOM_SKIN = HOME_KEY + "random_skin";
|
public static final String RANDOM_SKIN = HOME_KEY + "random_skin";
|
||||||
public static final String SETTINGS = HOME_KEY + "settings";
|
public static final String SETTINGS = HOME_KEY + "settings";
|
||||||
public static final String FAVORITES = HOME_KEY + "favorites";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Settings {
|
public static class Settings {
|
||||||
|
|
|
@ -45,7 +45,6 @@ gui:
|
||||||
confirm: "Are you sure?"
|
confirm: "Are you sure?"
|
||||||
cache: "Cache Management"
|
cache: "Cache Management"
|
||||||
invalidate_skin: "Purge cache..."
|
invalidate_skin: "Purge cache..."
|
||||||
favorites: "Favorites"
|
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
name: "Exit"
|
name: "Exit"
|
||||||
|
@ -101,10 +100,6 @@ gui:
|
||||||
name: "Reset appearance"
|
name: "Reset appearance"
|
||||||
lore:
|
lore:
|
||||||
- "<gray>Completely remove your disguise.</gray>"
|
- "<gray>Completely remove your disguise.</gray>"
|
||||||
favorites:
|
|
||||||
name: "Favorites"
|
|
||||||
lore:
|
|
||||||
- "<gray>List all your favorites appearances.</gray>"
|
|
||||||
admin:
|
admin:
|
||||||
manage_cache:
|
manage_cache:
|
||||||
name: "Manage the skin cache..."
|
name: "Manage the skin cache..."
|
||||||
|
|
|
@ -45,7 +45,6 @@ gui:
|
||||||
confirm: "Êtes-vous sûr ?"
|
confirm: "Êtes-vous sûr ?"
|
||||||
cache: "Gestion du Cache"
|
cache: "Gestion du Cache"
|
||||||
invalidate_skin: "Purge du cache..."
|
invalidate_skin: "Purge du cache..."
|
||||||
favorites: "Favoris"
|
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
name: "Quitter"
|
name: "Quitter"
|
||||||
|
@ -102,10 +101,6 @@ gui:
|
||||||
name: "Réinitialiser l'apparence"
|
name: "Réinitialiser l'apparence"
|
||||||
lore:
|
lore:
|
||||||
- "<gray>Supprime complètement votre déguisement.</gray>"
|
- "<gray>Supprime complètement votre déguisement.</gray>"
|
||||||
favorites:
|
|
||||||
name: "Favoris"
|
|
||||||
lore:
|
|
||||||
- "<gray>Listez toutes vos apparences favorites.</gray>"
|
|
||||||
admin:
|
admin:
|
||||||
manage_cache:
|
manage_cache:
|
||||||
name: "Gérer le cache de skin..."
|
name: "Gérer le cache de skin..."
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue