feat: updated to latest version of InvUI
This commit is contained in:
parent
91d914fd23
commit
5413b7aca9
31 changed files with 334 additions and 412 deletions
19
core/pom.xml
19
core/pom.xml
|
@ -15,7 +15,6 @@
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<cache2k-version>2.6.1.Final</cache2k-version>
|
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<repositories>
|
<repositories>
|
||||||
|
@ -23,10 +22,6 @@
|
||||||
<id>papermc</id>
|
<id>papermc</id>
|
||||||
<url>https://repo.papermc.io/repository/maven-public/</url>
|
<url>https://repo.papermc.io/repository/maven-public/</url>
|
||||||
</repository>
|
</repository>
|
||||||
<repository>
|
|
||||||
<id>xenondevs</id>
|
|
||||||
<url>https://repo.xenondevs.xyz/releases</url>
|
|
||||||
</repository>
|
|
||||||
<repository>
|
<repository>
|
||||||
<id>spigot-repo</id>
|
<id>spigot-repo</id>
|
||||||
<url>https://hub.spigotmc.org/nexus/content/groups/public/</url>
|
<url>https://hub.spigotmc.org/nexus/content/groups/public/</url>
|
||||||
|
@ -58,9 +53,9 @@
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- Inventory Lib -->
|
<!-- Inventory Lib -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>de.studiocode.invui</groupId>
|
<groupId>xyz.xenondevs.invui</groupId>
|
||||||
<artifactId>InvUI</artifactId>
|
<artifactId>invui</artifactId>
|
||||||
<version>0.10.2</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- AnvilGUI -->
|
<!-- AnvilGUI -->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
@ -86,23 +81,23 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.mariadb.jdbc</groupId>
|
<groupId>org.mariadb.jdbc</groupId>
|
||||||
<artifactId>mariadb-java-client</artifactId>
|
<artifactId>mariadb-java-client</artifactId>
|
||||||
<version>3.1.0</version>
|
<version>3.1.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- YAML Reader -->
|
<!-- YAML Reader -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.jsixface</groupId>
|
<groupId>com.github.jsixface</groupId>
|
||||||
<artifactId>yamlconfig</artifactId>
|
<artifactId>yamlconfig</artifactId>
|
||||||
<version>1.1.1</version>
|
<version>1.1.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.fasterxml.jackson.core</groupId>
|
<groupId>com.fasterxml.jackson.core</groupId>
|
||||||
<artifactId>jackson-core</artifactId>
|
<artifactId>jackson-core</artifactId>
|
||||||
<version>2.14.0-rc1</version>
|
<version>2.14.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
<groupId>com.fasterxml.jackson.dataformat</groupId>
|
||||||
<artifactId>jackson-dataformat-yaml</artifactId>
|
<artifactId>jackson-dataformat-yaml</artifactId>
|
||||||
<version>2.14.0-rc1</version>
|
<version>2.14.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- Redis -->
|
<!-- Redis -->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package net.artelnatif.nicko;
|
package net.artelnatif.nicko;
|
||||||
|
|
||||||
import de.studiocode.invui.gui.structure.Structure;
|
import xyz.xenondevs.invui.gui.structure.Structure;
|
||||||
import de.studiocode.invui.item.builder.ItemBuilder;
|
import xyz.xenondevs.invui.item.builder.ItemBuilder;
|
||||||
import de.studiocode.invui.item.impl.SimpleItem;
|
import xyz.xenondevs.invui.item.impl.SimpleItem;
|
||||||
import net.artelnatif.nicko.command.NickoCommand;
|
import net.artelnatif.nicko.command.NickoCommand;
|
||||||
import net.artelnatif.nicko.config.Configuration;
|
import net.artelnatif.nicko.config.Configuration;
|
||||||
import net.artelnatif.nicko.config.ConfigurationManager;
|
import net.artelnatif.nicko.config.ConfigurationManager;
|
||||||
|
|
|
@ -1,19 +1,17 @@
|
||||||
package net.artelnatif.nicko.gui;
|
package net.artelnatif.nicko.gui;
|
||||||
|
|
||||||
import de.studiocode.invui.gui.GUI;
|
|
||||||
import de.studiocode.invui.gui.builder.GUIBuilder;
|
|
||||||
import de.studiocode.invui.gui.builder.guitype.GUIType;
|
|
||||||
import de.studiocode.invui.window.impl.single.SimpleWindow;
|
|
||||||
import net.artelnatif.nicko.gui.items.common.GoBack;
|
|
||||||
import net.artelnatif.nicko.gui.items.admin.ManageCache;
|
import net.artelnatif.nicko.gui.items.admin.ManageCache;
|
||||||
|
import net.artelnatif.nicko.gui.items.common.GoBack;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
import xyz.xenondevs.invui.gui.Gui;
|
||||||
|
import xyz.xenondevs.invui.window.Window;
|
||||||
|
|
||||||
public class AdminGUI {
|
public class AdminGUI {
|
||||||
private final Player player;
|
private final Player player;
|
||||||
private final GUI gui;
|
private final Gui gui;
|
||||||
|
|
||||||
public AdminGUI(Player player) {
|
public AdminGUI(Player player) {
|
||||||
this.gui = new GUIBuilder<>(GUIType.NORMAL)
|
this.gui = Gui.normal()
|
||||||
.setStructure(
|
.setStructure(
|
||||||
"# # # # # # # # #",
|
"# # # # # # # # #",
|
||||||
"# % % X X S % % #",
|
"# % % X X S % % #",
|
||||||
|
@ -25,11 +23,11 @@ public class AdminGUI {
|
||||||
this.player = player;
|
this.player = player;
|
||||||
}
|
}
|
||||||
|
|
||||||
public GUI getGUI() {
|
public Gui getGUI() {
|
||||||
return gui;
|
return gui;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void open() {
|
public void open() {
|
||||||
new SimpleWindow(player, "Nicko", gui).show();
|
Window.single().setGui(gui).setTitle("Nicko").open(player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,21 +1,19 @@
|
||||||
package net.artelnatif.nicko.gui;
|
package net.artelnatif.nicko.gui;
|
||||||
|
|
||||||
import de.studiocode.invui.gui.GUI;
|
|
||||||
import de.studiocode.invui.gui.builder.GUIBuilder;
|
|
||||||
import de.studiocode.invui.gui.builder.guitype.GUIType;
|
|
||||||
import de.studiocode.invui.window.impl.single.SimpleWindow;
|
|
||||||
import net.artelnatif.nicko.gui.items.common.GoBack;
|
import net.artelnatif.nicko.gui.items.common.GoBack;
|
||||||
import net.artelnatif.nicko.gui.items.skin.ChangeSkin;
|
|
||||||
import net.artelnatif.nicko.gui.items.skin.ChangeName;
|
import net.artelnatif.nicko.gui.items.skin.ChangeName;
|
||||||
import net.artelnatif.nicko.gui.items.skin.ChangeNameAndSkin;
|
import net.artelnatif.nicko.gui.items.skin.ChangeNameAndSkin;
|
||||||
|
import net.artelnatif.nicko.gui.items.skin.ChangeSkin;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
import xyz.xenondevs.invui.gui.Gui;
|
||||||
|
import xyz.xenondevs.invui.window.Window;
|
||||||
|
|
||||||
public class AppearanceManagerGUI {
|
public class AppearanceManagerGUI {
|
||||||
private final Player player;
|
private final Player player;
|
||||||
private final GUI gui;
|
private final Gui gui;
|
||||||
|
|
||||||
public AppearanceManagerGUI(Player player) {
|
public AppearanceManagerGUI(Player player) {
|
||||||
this.gui = new GUIBuilder<>(GUIType.NORMAL)
|
this.gui = Gui.normal()
|
||||||
.setStructure(
|
.setStructure(
|
||||||
"# # # # # # # # #",
|
"# # # # # # # # #",
|
||||||
"# % % % % % % % #",
|
"# % % % % % % % #",
|
||||||
|
@ -32,6 +30,6 @@ public class AppearanceManagerGUI {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void open() {
|
public void open() {
|
||||||
new SimpleWindow(player, "Nicko", gui).show();
|
Window.single().setGui(gui).setTitle("Nicko").open(player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +1,16 @@
|
||||||
package net.artelnatif.nicko.gui;
|
package net.artelnatif.nicko.gui;
|
||||||
|
|
||||||
import de.studiocode.invui.gui.GUI;
|
|
||||||
import de.studiocode.invui.gui.builder.GUIBuilder;
|
|
||||||
import de.studiocode.invui.gui.builder.guitype.GUIType;
|
|
||||||
import de.studiocode.invui.window.impl.single.SimpleWindow;
|
|
||||||
import net.artelnatif.nicko.gui.items.main.AdminSubGUI;
|
import net.artelnatif.nicko.gui.items.main.AdminSubGUI;
|
||||||
import net.artelnatif.nicko.gui.items.main.AppearanceManagerSubGUI;
|
import net.artelnatif.nicko.gui.items.main.AppearanceManagerSubGUI;
|
||||||
import net.artelnatif.nicko.gui.items.main.ResetAppearance;
|
import net.artelnatif.nicko.gui.items.main.ResetAppearance;
|
||||||
import net.artelnatif.nicko.gui.items.main.SettingsSubGUI;
|
import net.artelnatif.nicko.gui.items.main.SettingsSubGUI;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
import xyz.xenondevs.invui.gui.Gui;
|
||||||
|
import xyz.xenondevs.invui.window.Window;
|
||||||
|
|
||||||
public class MainGUI {
|
public class MainGUI {
|
||||||
private final Player player;
|
private final Player player;
|
||||||
private final GUI gui;
|
private final Gui gui;
|
||||||
|
|
||||||
public MainGUI(Player player) {
|
public MainGUI(Player player) {
|
||||||
final String[] dynamicStructure = new String[]{
|
final String[] dynamicStructure = new String[]{
|
||||||
|
@ -26,7 +24,7 @@ public class MainGUI {
|
||||||
dynamicStructure[3] = dynamicStructure[3].replace("A", "#");
|
dynamicStructure[3] = dynamicStructure[3].replace("A", "#");
|
||||||
}
|
}
|
||||||
|
|
||||||
this.gui = new GUIBuilder<>(GUIType.NORMAL)
|
this.gui = Gui.normal()
|
||||||
.setStructure(dynamicStructure)
|
.setStructure(dynamicStructure)
|
||||||
.addIngredient('R', new ResetAppearance())
|
.addIngredient('R', new ResetAppearance())
|
||||||
.addIngredient('S', new AppearanceManagerSubGUI())
|
.addIngredient('S', new AppearanceManagerSubGUI())
|
||||||
|
@ -36,11 +34,11 @@ public class MainGUI {
|
||||||
this.player = player;
|
this.player = player;
|
||||||
}
|
}
|
||||||
|
|
||||||
public GUI getGUI() {
|
public Gui getGUI() {
|
||||||
return gui;
|
return gui;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void open() {
|
public void open() {
|
||||||
new SimpleWindow(player, "Nicko", gui).show();
|
Window.single().setGui(gui).setTitle("Nicko").open(player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +1,16 @@
|
||||||
package net.artelnatif.nicko.gui;
|
package net.artelnatif.nicko.gui;
|
||||||
|
|
||||||
import de.studiocode.invui.gui.GUI;
|
|
||||||
import de.studiocode.invui.gui.builder.GUIBuilder;
|
|
||||||
import de.studiocode.invui.gui.builder.guitype.GUIType;
|
|
||||||
import de.studiocode.invui.window.impl.single.SimpleWindow;
|
|
||||||
import net.artelnatif.nicko.gui.items.common.GoBack;
|
import net.artelnatif.nicko.gui.items.common.GoBack;
|
||||||
import net.artelnatif.nicko.gui.items.settings.BungeeCordCycling;
|
import net.artelnatif.nicko.gui.items.settings.BungeeCordCycling;
|
||||||
import net.artelnatif.nicko.gui.items.settings.LanguageCycling;
|
import net.artelnatif.nicko.gui.items.settings.LanguageCycling;
|
||||||
import net.artelnatif.nicko.gui.items.settings.OptionUnavailable;
|
import net.artelnatif.nicko.gui.items.settings.OptionUnavailable;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
import xyz.xenondevs.invui.gui.Gui;
|
||||||
|
import xyz.xenondevs.invui.window.Window;
|
||||||
|
|
||||||
public class SettingsGUI {
|
public class SettingsGUI {
|
||||||
private final Player player;
|
private final Player player;
|
||||||
private final GUI gui;
|
private final Gui gui;
|
||||||
|
|
||||||
public SettingsGUI(Player player) {
|
public SettingsGUI(Player player) {
|
||||||
final String[] dynamicStructure = new String[]{
|
final String[] dynamicStructure = new String[]{
|
||||||
|
@ -24,7 +22,7 @@ public class SettingsGUI {
|
||||||
// TODO: 3/6/23 Replace when Redis is not enabled
|
// TODO: 3/6/23 Replace when Redis is not enabled
|
||||||
dynamicStructure[1] = dynamicStructure[1].replace("T", "U");
|
dynamicStructure[1] = dynamicStructure[1].replace("T", "U");
|
||||||
|
|
||||||
this.gui = new GUIBuilder<>(GUIType.NORMAL)
|
this.gui = Gui.normal()
|
||||||
.setStructure(dynamicStructure)
|
.setStructure(dynamicStructure)
|
||||||
.addIngredient('B', new GoBack(new MainGUI(player).getGUI()))
|
.addIngredient('B', new GoBack(new MainGUI(player).getGUI()))
|
||||||
.addIngredient('L', new LanguageCycling().get(player))
|
.addIngredient('L', new LanguageCycling().get(player))
|
||||||
|
@ -35,6 +33,6 @@ public class SettingsGUI {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void open() {
|
public void open() {
|
||||||
new SimpleWindow(player, "Nicko", gui).show();
|
Window.single().setGui(gui).setTitle("Nicko").open(player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,22 +1,20 @@
|
||||||
package net.artelnatif.nicko.gui.admin;
|
package net.artelnatif.nicko.gui.admin;
|
||||||
|
|
||||||
import de.studiocode.invui.gui.GUI;
|
|
||||||
import de.studiocode.invui.gui.builder.GUIBuilder;
|
|
||||||
import de.studiocode.invui.gui.builder.guitype.GUIType;
|
|
||||||
import de.studiocode.invui.window.impl.single.SimpleWindow;
|
|
||||||
import net.artelnatif.nicko.gui.AdminGUI;
|
import net.artelnatif.nicko.gui.AdminGUI;
|
||||||
import net.artelnatif.nicko.gui.items.admin.cache.CacheDetailed;
|
import net.artelnatif.nicko.gui.items.admin.cache.CacheDetailed;
|
||||||
import net.artelnatif.nicko.gui.items.admin.cache.CacheInvalidate;
|
import net.artelnatif.nicko.gui.items.admin.cache.CacheInvalidate;
|
||||||
import net.artelnatif.nicko.gui.items.admin.cache.CacheOverview;
|
import net.artelnatif.nicko.gui.items.admin.cache.CacheOverview;
|
||||||
import net.artelnatif.nicko.gui.items.common.GoBack;
|
import net.artelnatif.nicko.gui.items.common.GoBack;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
import xyz.xenondevs.invui.gui.Gui;
|
||||||
|
import xyz.xenondevs.invui.window.Window;
|
||||||
|
|
||||||
public class CacheManagementGUI {
|
public class CacheManagementGUI {
|
||||||
private final Player player;
|
private final Player player;
|
||||||
private final GUI gui;
|
private final Gui gui;
|
||||||
|
|
||||||
public CacheManagementGUI(Player player) {
|
public CacheManagementGUI(Player player) {
|
||||||
this.gui = new GUIBuilder<>(GUIType.NORMAL)
|
this.gui = Gui.normal()
|
||||||
.setStructure("B # S A D")
|
.setStructure("B # S A D")
|
||||||
.addIngredient('B', new GoBack(new AdminGUI(player).getGUI()))
|
.addIngredient('B', new GoBack(new AdminGUI(player).getGUI()))
|
||||||
.addIngredient('S', new CacheOverview())
|
.addIngredient('S', new CacheOverview())
|
||||||
|
@ -26,11 +24,11 @@ public class CacheManagementGUI {
|
||||||
this.player = player;
|
this.player = player;
|
||||||
}
|
}
|
||||||
|
|
||||||
public GUI getGUI() {
|
public Gui getGUI() {
|
||||||
return gui;
|
return gui;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void open() {
|
public void open() {
|
||||||
new SimpleWindow(player, "Nicko", gui).show();
|
Window.single().setGui(gui).setTitle("Nicko").open(player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
package net.artelnatif.nicko.gui.admin.cache;
|
package net.artelnatif.nicko.gui.admin.cache;
|
||||||
|
|
||||||
import de.studiocode.invui.gui.GUI;
|
import xyz.xenondevs.invui.gui.Gui;
|
||||||
import de.studiocode.invui.gui.builder.GUIBuilder;
|
import xyz.xenondevs.invui.gui.ScrollGui;
|
||||||
import de.studiocode.invui.gui.builder.guitype.GUIType;
|
import xyz.xenondevs.invui.gui.structure.Markers;
|
||||||
import de.studiocode.invui.gui.structure.Markers;
|
import xyz.xenondevs.invui.item.Item;
|
||||||
import de.studiocode.invui.item.Item;
|
|
||||||
import de.studiocode.invui.window.impl.single.SimpleWindow;
|
|
||||||
import net.artelnatif.nicko.NickoBukkit;
|
import net.artelnatif.nicko.NickoBukkit;
|
||||||
import net.artelnatif.nicko.gui.items.admin.cache.SkinPlaceholder;
|
import net.artelnatif.nicko.gui.items.admin.cache.SkinPlaceholder;
|
||||||
import net.artelnatif.nicko.gui.admin.CacheManagementGUI;
|
import net.artelnatif.nicko.gui.admin.CacheManagementGUI;
|
||||||
|
@ -14,6 +12,7 @@ import net.artelnatif.nicko.gui.items.common.ScrollDown;
|
||||||
import net.artelnatif.nicko.gui.items.common.ScrollUp;
|
import net.artelnatif.nicko.gui.items.common.ScrollUp;
|
||||||
import net.artelnatif.nicko.mojang.MojangSkin;
|
import net.artelnatif.nicko.mojang.MojangSkin;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
import xyz.xenondevs.invui.window.Window;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -23,7 +22,7 @@ import java.util.stream.Collectors;
|
||||||
|
|
||||||
public class CacheDetailledGUI {
|
public class CacheDetailledGUI {
|
||||||
private final Player player;
|
private final Player player;
|
||||||
private final GUI gui;
|
private final Gui gui;
|
||||||
|
|
||||||
public CacheDetailledGUI(Player player) {
|
public CacheDetailledGUI(Player player) {
|
||||||
final ConcurrentMap<String, Optional<MojangSkin>> skins = NickoBukkit.getInstance().getMojangAPI().getCache().asMap();
|
final ConcurrentMap<String, Optional<MojangSkin>> skins = NickoBukkit.getInstance().getMojangAPI().getCache().asMap();
|
||||||
|
@ -36,29 +35,24 @@ public class CacheDetailledGUI {
|
||||||
.map(SkinPlaceholder::new)
|
.map(SkinPlaceholder::new)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
this.gui = new GUIBuilder<>(GUIType.SCROLL_ITEMS)
|
gui = ScrollGui.items(guiItemBuilder -> {
|
||||||
.setStructure(
|
guiItemBuilder.setStructure("% # # # # # # # %",
|
||||||
"% # # # # # # # %",
|
"# x x x x x x U #",
|
||||||
"# x x x x x x U #",
|
"# x x x x x x # #",
|
||||||
"# x x x x x x # #",
|
"# x x x x x x D #",
|
||||||
"# x x x x x x # #",
|
"# x x x x x x # #",
|
||||||
"# x x x x x x D #",
|
"B # # # # # # # %");
|
||||||
"B # # # # # # # %"
|
guiItemBuilder.addIngredient('x', Markers.CONTENT_LIST_SLOT_HORIZONTAL);
|
||||||
)
|
guiItemBuilder.addIngredient('U', new ScrollUp());
|
||||||
.addIngredient('x', Markers.ITEM_LIST_SLOT_HORIZONTAL)
|
guiItemBuilder.addIngredient('D', new ScrollDown());
|
||||||
.addIngredient('U', new ScrollUp())
|
guiItemBuilder.addIngredient('B', new GoBack(new CacheManagementGUI(player).getGUI()));
|
||||||
.addIngredient('D', new ScrollDown())
|
guiItemBuilder.setContent(items);
|
||||||
.addIngredient('B', new GoBack(new CacheManagementGUI(player).getGUI()))
|
});
|
||||||
.setItems(items)
|
|
||||||
.build();
|
|
||||||
this.player = player;
|
this.player = player;
|
||||||
}
|
}
|
||||||
|
|
||||||
public GUI getGUI() {
|
|
||||||
return gui;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void open() {
|
public void open() {
|
||||||
new SimpleWindow(player, "Nicko", gui).show();
|
Window.single().setGui(gui).setTitle("Nicko").open(player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package net.artelnatif.nicko.gui.items.admin;
|
package net.artelnatif.nicko.gui.items.admin;
|
||||||
|
|
||||||
import de.studiocode.invui.item.builder.ItemBuilder;
|
import xyz.xenondevs.invui.item.builder.ItemBuilder;
|
||||||
import de.studiocode.invui.item.builder.SkullBuilder;
|
import xyz.xenondevs.invui.item.builder.SkullBuilder;
|
||||||
import de.studiocode.invui.item.impl.AsyncItem;
|
import xyz.xenondevs.invui.item.impl.AsyncItem;
|
||||||
import net.artelnatif.nicko.gui.admin.CacheManagementGUI;
|
import net.artelnatif.nicko.gui.admin.CacheManagementGUI;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
|
@ -1,29 +1,26 @@
|
||||||
package net.artelnatif.nicko.gui.items.admin.cache;
|
package net.artelnatif.nicko.gui.items.admin.cache;
|
||||||
|
|
||||||
import de.studiocode.invui.item.ItemProvider;
|
|
||||||
import de.studiocode.invui.item.builder.ItemBuilder;
|
|
||||||
import de.studiocode.invui.item.impl.BaseItem;
|
|
||||||
import net.artelnatif.nicko.gui.admin.cache.CacheDetailledGUI;
|
import net.artelnatif.nicko.gui.admin.cache.CacheDetailledGUI;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
import org.bukkit.event.inventory.ClickType;
|
import org.bukkit.event.inventory.ClickType;
|
||||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
import xyz.xenondevs.invui.item.builder.ItemBuilder;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import xyz.xenondevs.invui.item.impl.SuppliedItem;
|
||||||
|
|
||||||
public class CacheDetailed extends BaseItem {
|
public class CacheDetailed extends SuppliedItem {
|
||||||
@Override
|
public CacheDetailed() {
|
||||||
public ItemProvider getItemProvider() {
|
super(() -> {
|
||||||
final ItemBuilder builder = new ItemBuilder(Material.PAPER);
|
final ItemBuilder builder = new ItemBuilder(Material.PAPER);
|
||||||
builder.setDisplayName("§6Invalidate specific skin...");
|
builder.setDisplayName("§6Invalidate specific skin...");
|
||||||
builder.addLoreLines("§7Select a specific skin to invalidate.");
|
builder.addLoreLines("§7Select a specific skin to invalidate.");
|
||||||
return builder;
|
return builder;
|
||||||
}
|
}, (click) -> {
|
||||||
|
final ClickType clickType = click.getClickType();
|
||||||
@Override
|
if (clickType.isLeftClick() || clickType.isRightClick()) {
|
||||||
public void handleClick(@NotNull ClickType clickType, @NotNull Player player, @NotNull InventoryClickEvent event) {
|
click.getEvent().getView().close();
|
||||||
if (clickType.isLeftClick() || clickType.isRightClick()) {
|
new CacheDetailledGUI(click.getPlayer()).open();
|
||||||
event.getView().close();
|
return true;
|
||||||
new CacheDetailledGUI(player).open();
|
}
|
||||||
}
|
return false;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,37 +1,36 @@
|
||||||
package net.artelnatif.nicko.gui.items.admin.cache;
|
package net.artelnatif.nicko.gui.items.admin.cache;
|
||||||
|
|
||||||
import de.studiocode.invui.item.ItemProvider;
|
|
||||||
import de.studiocode.invui.item.builder.ItemBuilder;
|
|
||||||
import de.studiocode.invui.item.impl.BaseItem;
|
|
||||||
import net.artelnatif.nicko.NickoBukkit;
|
import net.artelnatif.nicko.NickoBukkit;
|
||||||
import net.artelnatif.nicko.i18n.I18N;
|
import net.artelnatif.nicko.i18n.I18N;
|
||||||
import net.artelnatif.nicko.i18n.I18NDict;
|
import net.artelnatif.nicko.i18n.I18NDict;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.inventory.ClickType;
|
import org.bukkit.event.inventory.ClickType;
|
||||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
import xyz.xenondevs.invui.item.builder.ItemBuilder;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import xyz.xenondevs.invui.item.impl.SuppliedItem;
|
||||||
|
|
||||||
public class CacheInvalidate extends BaseItem {
|
public class CacheInvalidate extends SuppliedItem {
|
||||||
@Override
|
public CacheInvalidate() {
|
||||||
public ItemProvider getItemProvider() {
|
super(() -> {
|
||||||
final ItemBuilder builder = new ItemBuilder(Material.TNT);
|
final ItemBuilder builder = new ItemBuilder(Material.TNT);
|
||||||
builder.setDisplayName("§fInvalidate §6skin cache");
|
builder.setDisplayName("§fInvalidate §6skin cache");
|
||||||
builder.addLoreLines(
|
builder.addLoreLines(
|
||||||
"§c§oNOT RECOMMENDED",
|
"§c§oNOT RECOMMENDED",
|
||||||
"§7Invalidates every skin entry present in the cache.",
|
"§7Invalidates every skin entry present in the cache.",
|
||||||
"§7Does not reset player disguises.",
|
"§7Does not reset player disguises.",
|
||||||
"§7Could be useful if a skin has been updated",
|
"§7Could be useful if a skin has been updated",
|
||||||
"§7recently and the cache is now outdated.");
|
"§7recently and the cache is now outdated.");
|
||||||
return builder;
|
return builder;
|
||||||
}
|
}, (click) -> {
|
||||||
|
final ClickType clickType = click.getClickType();
|
||||||
@Override
|
if (clickType.isLeftClick() || clickType.isRightClick()) {
|
||||||
public void handleClick(@NotNull ClickType clickType, @NotNull Player player, @NotNull InventoryClickEvent event) {
|
final Player player = click.getPlayer();
|
||||||
if (clickType.isLeftClick() || clickType.isRightClick()) {
|
click.getEvent().getView().close();
|
||||||
event.getView().close();
|
player.sendMessage(I18N.translate(player, I18NDict.Event.Admin.CACHE_CLEAN));
|
||||||
player.sendMessage(I18N.translate(player, I18NDict.Event.Admin.CACHE_CLEAN));
|
NickoBukkit.getInstance().getMojangAPI().getCache().invalidateAll();
|
||||||
NickoBukkit.getInstance().getMojangAPI().getCache().invalidateAll();
|
return true;
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,38 +2,27 @@ package net.artelnatif.nicko.gui.items.admin.cache;
|
||||||
|
|
||||||
import com.google.common.cache.CacheStats;
|
import com.google.common.cache.CacheStats;
|
||||||
import com.google.common.cache.LoadingCache;
|
import com.google.common.cache.LoadingCache;
|
||||||
import de.studiocode.invui.item.ItemProvider;
|
|
||||||
import de.studiocode.invui.item.builder.ItemBuilder;
|
|
||||||
import de.studiocode.invui.item.impl.BaseItem;
|
|
||||||
import net.artelnatif.nicko.NickoBukkit;
|
import net.artelnatif.nicko.NickoBukkit;
|
||||||
import net.artelnatif.nicko.mojang.MojangSkin;
|
import net.artelnatif.nicko.mojang.MojangSkin;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
import xyz.xenondevs.invui.item.builder.ItemBuilder;
|
||||||
import org.bukkit.event.inventory.ClickType;
|
import xyz.xenondevs.invui.item.impl.SuppliedItem;
|
||||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
|
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
public class CacheOverview extends BaseItem {
|
public class CacheOverview extends SuppliedItem {
|
||||||
@Override
|
public CacheOverview() {
|
||||||
public ItemProvider getItemProvider() {
|
super(() -> {
|
||||||
final ItemBuilder builder = new ItemBuilder(Material.OAK_SIGN);
|
final ItemBuilder builder = new ItemBuilder(Material.OAK_SIGN);
|
||||||
final LoadingCache<String, Optional<MojangSkin>> cache = NickoBukkit.getInstance().getMojangAPI().getCache();
|
final LoadingCache<String, Optional<MojangSkin>> cache = NickoBukkit.getInstance().getMojangAPI().getCache();
|
||||||
final CacheStats stats = cache.stats();
|
final CacheStats stats = cache.stats();
|
||||||
builder.setDisplayName("§6Skin cache §foverview:");
|
builder.setDisplayName("§6Skin cache §foverview:");
|
||||||
builder.addLoreLines(
|
builder.addLoreLines(
|
||||||
"Request Count: §2" + stats.requestCount(),
|
"Request Count: §2" + stats.requestCount(),
|
||||||
"Skin Cached: §2" + Math.round(cache.size()),
|
"Skin Cached: §2" + Math.round(cache.size()),
|
||||||
"§7§oCache is cleared every 24 hours.",
|
"§7§oCache is cleared every 24 hours.",
|
||||||
"§7§o(Click to refresh)");
|
"§7§o(Click to refresh)");
|
||||||
return builder;
|
return builder;
|
||||||
}
|
}, (event) -> true);
|
||||||
|
|
||||||
@Override
|
|
||||||
public void handleClick(@NotNull ClickType clickType, @NotNull Player player, @NotNull InventoryClickEvent event) {
|
|
||||||
if (clickType.isLeftClick() || clickType.isRightClick()) {
|
|
||||||
notifyWindows();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,9 +1,9 @@
|
||||||
package net.artelnatif.nicko.gui.items.admin.cache;
|
package net.artelnatif.nicko.gui.items.admin.cache;
|
||||||
|
|
||||||
import de.studiocode.invui.item.builder.ItemBuilder;
|
|
||||||
import de.studiocode.invui.item.builder.SkullBuilder;
|
|
||||||
import de.studiocode.invui.item.impl.AsyncItem;
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
import xyz.xenondevs.invui.item.builder.ItemBuilder;
|
||||||
|
import xyz.xenondevs.invui.item.builder.SkullBuilder;
|
||||||
|
import xyz.xenondevs.invui.item.impl.AsyncItem;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
|
|
@ -1,34 +1,22 @@
|
||||||
package net.artelnatif.nicko.gui.items.common;
|
package net.artelnatif.nicko.gui.items.common;
|
||||||
|
|
||||||
import de.studiocode.invui.gui.GUI;
|
|
||||||
import de.studiocode.invui.item.ItemProvider;
|
|
||||||
import de.studiocode.invui.item.builder.ItemBuilder;
|
|
||||||
import de.studiocode.invui.item.impl.BaseItem;
|
|
||||||
import de.studiocode.invui.window.impl.single.SimpleWindow;
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
import xyz.xenondevs.invui.gui.Gui;
|
||||||
import org.bukkit.event.inventory.ClickType;
|
import xyz.xenondevs.invui.item.builder.ItemBuilder;
|
||||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
import xyz.xenondevs.invui.item.impl.SuppliedItem;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import xyz.xenondevs.invui.window.Window;
|
||||||
|
|
||||||
public class GoBack extends BaseItem {
|
public class GoBack extends SuppliedItem {
|
||||||
private final GUI gui;
|
public GoBack(Gui gui) {
|
||||||
|
super(() -> {
|
||||||
public GoBack(GUI gui) {
|
final ItemBuilder builder = new ItemBuilder(Material.ARROW);
|
||||||
this.gui = gui;
|
builder.setDisplayName("Go back");
|
||||||
}
|
builder.addLoreLines("§7Return to the previous window.");
|
||||||
|
return builder;
|
||||||
@Override
|
}, click -> {
|
||||||
public ItemProvider getItemProvider() {
|
click.getEvent().getView().close();
|
||||||
final ItemBuilder builder = new ItemBuilder(Material.ARROW);
|
Window.single().setGui(gui).setTitle("Nicko").open(click.getPlayer());
|
||||||
builder.setDisplayName("Go back");
|
return true;
|
||||||
builder.addLoreLines("§7Return to the previous window.");
|
});
|
||||||
return builder;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void handleClick(@NotNull ClickType clickType, @NotNull Player player, @NotNull InventoryClickEvent event) {
|
|
||||||
event.getView().close();
|
|
||||||
new SimpleWindow(player, "Nicko", gui).show();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
package net.artelnatif.nicko.gui.items.common;
|
package net.artelnatif.nicko.gui.items.common;
|
||||||
|
|
||||||
import de.studiocode.invui.gui.impl.ScrollGUI;
|
|
||||||
import de.studiocode.invui.item.ItemProvider;
|
|
||||||
import de.studiocode.invui.item.builder.ItemBuilder;
|
|
||||||
import de.studiocode.invui.item.impl.controlitem.ScrollItem;
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
import xyz.xenondevs.invui.gui.ScrollGui;
|
||||||
|
import xyz.xenondevs.invui.item.ItemProvider;
|
||||||
|
import xyz.xenondevs.invui.item.builder.ItemBuilder;
|
||||||
|
import xyz.xenondevs.invui.item.impl.controlitem.ScrollItem;
|
||||||
|
|
||||||
public class ScrollDown extends ScrollItem {
|
public class ScrollDown extends ScrollItem {
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ public class ScrollDown extends ScrollItem {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ItemProvider getItemProvider(ScrollGUI gui) {
|
public ItemProvider getItemProvider(ScrollGui gui) {
|
||||||
ItemBuilder builder = new ItemBuilder(Material.GREEN_STAINED_GLASS_PANE);
|
ItemBuilder builder = new ItemBuilder(Material.GREEN_STAINED_GLASS_PANE);
|
||||||
builder.setDisplayName("§7Scroll down");
|
builder.setDisplayName("§7Scroll down");
|
||||||
if (!gui.canScroll(1))
|
if (!gui.canScroll(1))
|
||||||
|
@ -21,6 +21,5 @@ public class ScrollDown extends ScrollItem {
|
||||||
|
|
||||||
return builder;
|
return builder;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
package net.artelnatif.nicko.gui.items.common;
|
package net.artelnatif.nicko.gui.items.common;
|
||||||
|
|
||||||
import de.studiocode.invui.gui.impl.ScrollGUI;
|
|
||||||
import de.studiocode.invui.item.ItemProvider;
|
|
||||||
import de.studiocode.invui.item.builder.ItemBuilder;
|
|
||||||
import de.studiocode.invui.item.impl.controlitem.ScrollItem;
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
import xyz.xenondevs.invui.gui.ScrollGui;
|
||||||
|
import xyz.xenondevs.invui.item.ItemProvider;
|
||||||
|
import xyz.xenondevs.invui.item.builder.ItemBuilder;
|
||||||
|
import xyz.xenondevs.invui.item.impl.controlitem.ScrollItem;
|
||||||
|
|
||||||
public class ScrollUp extends ScrollItem {
|
public class ScrollUp extends ScrollItem {
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ public class ScrollUp extends ScrollItem {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ItemProvider getItemProvider(ScrollGUI gui) {
|
public ItemProvider getItemProvider(ScrollGui gui) {
|
||||||
ItemBuilder builder = new ItemBuilder(Material.RED_STAINED_GLASS_PANE);
|
ItemBuilder builder = new ItemBuilder(Material.RED_STAINED_GLASS_PANE);
|
||||||
builder.setDisplayName("§7Scroll up");
|
builder.setDisplayName("§7Scroll up");
|
||||||
if (!gui.canScroll(-1))
|
if (!gui.canScroll(-1))
|
||||||
|
|
|
@ -1,33 +1,30 @@
|
||||||
package net.artelnatif.nicko.gui.items.main;
|
package net.artelnatif.nicko.gui.items.main;
|
||||||
|
|
||||||
import de.studiocode.invui.item.ItemProvider;
|
|
||||||
import de.studiocode.invui.item.builder.ItemBuilder;
|
|
||||||
import de.studiocode.invui.item.impl.BaseItem;
|
|
||||||
import net.artelnatif.nicko.gui.AdminGUI;
|
import net.artelnatif.nicko.gui.AdminGUI;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.enchantments.Enchantment;
|
import org.bukkit.enchantments.Enchantment;
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
import org.bukkit.event.inventory.ClickType;
|
import org.bukkit.event.inventory.ClickType;
|
||||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
|
||||||
import org.bukkit.inventory.ItemFlag;
|
import org.bukkit.inventory.ItemFlag;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import xyz.xenondevs.invui.item.builder.ItemBuilder;
|
||||||
|
import xyz.xenondevs.invui.item.impl.SuppliedItem;
|
||||||
|
|
||||||
public class AdminSubGUI extends BaseItem {
|
public class AdminSubGUI extends SuppliedItem {
|
||||||
@Override
|
public AdminSubGUI() {
|
||||||
public ItemProvider getItemProvider() {
|
super(() -> {
|
||||||
final ItemBuilder builder = new ItemBuilder(Material.COMMAND_BLOCK);
|
final ItemBuilder builder = new ItemBuilder(Material.COMMAND_BLOCK);
|
||||||
builder.addEnchantment(Enchantment.DAMAGE_ALL, 1, false);
|
builder.addEnchantment(Enchantment.DAMAGE_ALL, 1, false);
|
||||||
builder.addItemFlags(ItemFlag.HIDE_ENCHANTS);
|
builder.addItemFlags(ItemFlag.HIDE_ENCHANTS);
|
||||||
builder.setDisplayName("§cAdministration panel...");
|
builder.setDisplayName("§cAdministration panel...");
|
||||||
builder.addLoreLines("§7Access the administration panel.");
|
builder.addLoreLines("§7Access the administration panel.");
|
||||||
return builder;
|
return builder;
|
||||||
}
|
}, click -> {
|
||||||
|
final ClickType clickType = click.getClickType();
|
||||||
@Override
|
if (clickType.isLeftClick() || clickType.isRightClick()) {
|
||||||
public void handleClick(@NotNull ClickType clickType, @NotNull Player player, @NotNull InventoryClickEvent event) {
|
click.getEvent().getView().close();
|
||||||
if (clickType.isLeftClick() || clickType.isRightClick()) {
|
new AdminGUI(click.getPlayer()).open();
|
||||||
event.getView().close();
|
return true;
|
||||||
new AdminGUI(player).open();
|
}
|
||||||
}
|
return false;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,29 +1,26 @@
|
||||||
package net.artelnatif.nicko.gui.items.main;
|
package net.artelnatif.nicko.gui.items.main;
|
||||||
|
|
||||||
import de.studiocode.invui.item.ItemProvider;
|
|
||||||
import de.studiocode.invui.item.builder.ItemBuilder;
|
|
||||||
import de.studiocode.invui.item.impl.BaseItem;
|
|
||||||
import net.artelnatif.nicko.gui.AppearanceManagerGUI;
|
import net.artelnatif.nicko.gui.AppearanceManagerGUI;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
import org.bukkit.event.inventory.ClickType;
|
import org.bukkit.event.inventory.ClickType;
|
||||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
import xyz.xenondevs.invui.item.builder.ItemBuilder;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import xyz.xenondevs.invui.item.impl.SuppliedItem;
|
||||||
|
|
||||||
public class AppearanceManagerSubGUI extends BaseItem {
|
public class AppearanceManagerSubGUI extends SuppliedItem {
|
||||||
@Override
|
public AppearanceManagerSubGUI() {
|
||||||
public ItemProvider getItemProvider() {
|
super(() -> {
|
||||||
final ItemBuilder builder = new ItemBuilder(Material.ENDER_EYE);
|
final ItemBuilder builder = new ItemBuilder(Material.ENDER_EYE);
|
||||||
builder.setDisplayName("§fManage §6appearance§f...");
|
builder.setDisplayName("§fManage §6appearance§f...");
|
||||||
builder.addLoreLines("§7Access the appearance manager.");
|
builder.addLoreLines("§7Access the appearance manager.");
|
||||||
return builder;
|
return builder;
|
||||||
}
|
}, (click) -> {
|
||||||
|
final ClickType clickType = click.getClickType();
|
||||||
@Override
|
if (clickType.isLeftClick() || clickType.isRightClick()) {
|
||||||
public void handleClick(@NotNull ClickType clickType, @NotNull Player player, @NotNull InventoryClickEvent event) {
|
click.getEvent().getView().close();
|
||||||
if (clickType.isLeftClick() || clickType.isRightClick()) {
|
new AppearanceManagerGUI(click.getPlayer()).open();
|
||||||
event.getView().close();
|
return true;
|
||||||
new AppearanceManagerGUI(player).open();
|
}
|
||||||
}
|
return false;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,24 +1,17 @@
|
||||||
package net.artelnatif.nicko.gui.items.main;
|
package net.artelnatif.nicko.gui.items.main;
|
||||||
|
|
||||||
import de.studiocode.invui.item.ItemProvider;
|
|
||||||
import de.studiocode.invui.item.builder.ItemBuilder;
|
|
||||||
import de.studiocode.invui.item.impl.BaseItem;
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
import org.bukkit.event.inventory.ClickType;
|
import org.bukkit.event.inventory.ClickType;
|
||||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
import xyz.xenondevs.invui.item.builder.ItemBuilder;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import xyz.xenondevs.invui.item.impl.SimpleItem;
|
||||||
|
|
||||||
public class ExitGUI extends BaseItem {
|
public class ExitGUI extends SimpleItem {
|
||||||
@Override
|
public ExitGUI() {
|
||||||
public ItemProvider getItemProvider() {
|
super(new ItemBuilder(Material.OAK_DOOR).setDisplayName("§fExit"), click -> {
|
||||||
return new ItemBuilder(Material.OAK_DOOR).setDisplayName("§fExit");
|
final ClickType clickType = click.getClickType();
|
||||||
}
|
if (clickType.isLeftClick() || clickType.isRightClick()) {
|
||||||
|
click.getEvent().getView().close();
|
||||||
@Override
|
}
|
||||||
public void handleClick(@NotNull ClickType clickType, @NotNull Player player, @NotNull InventoryClickEvent event) {
|
});
|
||||||
if (clickType.isLeftClick() || clickType.isRightClick()) {
|
|
||||||
event.getView().close();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,42 +1,42 @@
|
||||||
package net.artelnatif.nicko.gui.items.main;
|
package net.artelnatif.nicko.gui.items.main;
|
||||||
|
|
||||||
import de.studiocode.invui.item.ItemProvider;
|
|
||||||
import de.studiocode.invui.item.builder.ItemBuilder;
|
|
||||||
import de.studiocode.invui.item.impl.BaseItem;
|
|
||||||
import net.artelnatif.nicko.appearance.AppearanceManager;
|
import net.artelnatif.nicko.appearance.AppearanceManager;
|
||||||
import net.artelnatif.nicko.i18n.I18N;
|
import net.artelnatif.nicko.i18n.I18N;
|
||||||
import net.artelnatif.nicko.i18n.I18NDict;
|
import net.artelnatif.nicko.i18n.I18NDict;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.inventory.ClickType;
|
import org.bukkit.event.inventory.ClickType;
|
||||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
import xyz.xenondevs.invui.item.builder.ItemBuilder;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import xyz.xenondevs.invui.item.impl.SuppliedItem;
|
||||||
|
|
||||||
public class ResetAppearance extends BaseItem {
|
public class ResetAppearance extends SuppliedItem {
|
||||||
@Override
|
public ResetAppearance() {
|
||||||
public ItemProvider getItemProvider() {
|
super(() -> {
|
||||||
final ItemBuilder builder = new ItemBuilder(Material.TNT);
|
final ItemBuilder builder = new ItemBuilder(Material.TNT);
|
||||||
builder.setDisplayName("§fReset");
|
builder.setDisplayName("§fReset");
|
||||||
builder.addLoreLines("§7Get rid of your disguise.");
|
builder.addLoreLines("§7Get rid of your disguise.");
|
||||||
return builder;
|
return builder;
|
||||||
}
|
}, (event) -> {
|
||||||
|
final Player player = event.getPlayer();
|
||||||
|
final ClickType clickType = event.getClickType();
|
||||||
|
if (clickType.isLeftClick() || clickType.isRightClick()) {
|
||||||
|
final AppearanceManager appearanceManager = AppearanceManager.get(player);
|
||||||
|
|
||||||
@Override
|
if (!appearanceManager.hasData()) {
|
||||||
public void handleClick(@NotNull ClickType clickType, @NotNull Player player, @NotNull InventoryClickEvent event) {
|
player.sendMessage(I18N.translate(player, I18NDict.Event.Undisguise.NONE));
|
||||||
if (clickType.isLeftClick() || clickType.isRightClick()) {
|
event.getEvent().getView().close();
|
||||||
final AppearanceManager appearanceManager = AppearanceManager.get(player);
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (!appearanceManager.hasData()) {
|
if (!appearanceManager.reset().isError()) {
|
||||||
player.sendMessage(I18N.translate(player, I18NDict.Event.Undisguise.NONE));
|
player.sendMessage(I18N.translate(player, I18NDict.Event.Undisguise.SUCCESS));
|
||||||
event.getView().close();
|
return true;
|
||||||
return;
|
} else {
|
||||||
|
player.sendMessage(I18N.translate(player, I18NDict.Event.Undisguise.FAIL));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
if (!appearanceManager.reset().isError()) {
|
});
|
||||||
player.sendMessage(I18N.translate(player, I18NDict.Event.Undisguise.SUCCESS));
|
|
||||||
} else {
|
|
||||||
player.sendMessage(I18N.translate(player, I18NDict.Event.Undisguise.FAIL));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,29 +1,26 @@
|
||||||
package net.artelnatif.nicko.gui.items.main;
|
package net.artelnatif.nicko.gui.items.main;
|
||||||
|
|
||||||
import de.studiocode.invui.item.ItemProvider;
|
|
||||||
import de.studiocode.invui.item.builder.ItemBuilder;
|
|
||||||
import de.studiocode.invui.item.impl.BaseItem;
|
|
||||||
import net.artelnatif.nicko.gui.SettingsGUI;
|
import net.artelnatif.nicko.gui.SettingsGUI;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
import org.bukkit.event.inventory.ClickType;
|
import org.bukkit.event.inventory.ClickType;
|
||||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
import xyz.xenondevs.invui.item.builder.ItemBuilder;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import xyz.xenondevs.invui.item.impl.SuppliedItem;
|
||||||
|
|
||||||
public class SettingsSubGUI extends BaseItem {
|
public class SettingsSubGUI extends SuppliedItem {
|
||||||
@Override
|
public SettingsSubGUI() {
|
||||||
public ItemProvider getItemProvider() {
|
super(() -> {
|
||||||
final ItemBuilder builder = new ItemBuilder(Material.COMPARATOR);
|
final ItemBuilder builder = new ItemBuilder(Material.COMPARATOR);
|
||||||
builder.setDisplayName("§fSettings...");
|
builder.setDisplayName("§fSettings...");
|
||||||
builder.addLoreLines("§7Adjust your preferences.");
|
builder.addLoreLines("§7Adjust your preferences.");
|
||||||
return builder;
|
return builder;
|
||||||
}
|
}, click -> {
|
||||||
|
final ClickType clickType = click.getClickType();
|
||||||
@Override
|
if (clickType.isLeftClick() || clickType.isRightClick()) {
|
||||||
public void handleClick(@NotNull ClickType clickType, @NotNull Player player, @NotNull InventoryClickEvent event) {
|
click.getEvent().getView().close();
|
||||||
if (clickType.isLeftClick() || clickType.isRightClick()) {
|
new SettingsGUI(click.getPlayer()).open();
|
||||||
event.getView().close();
|
return true;
|
||||||
new SettingsGUI(player).open();
|
}
|
||||||
}
|
return false;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
package net.artelnatif.nicko.gui.items.settings;
|
package net.artelnatif.nicko.gui.items.settings;
|
||||||
|
|
||||||
import de.studiocode.invui.item.ItemProvider;
|
|
||||||
import de.studiocode.invui.item.builder.ItemBuilder;
|
|
||||||
import de.studiocode.invui.item.impl.BaseItem;
|
|
||||||
import de.studiocode.invui.item.impl.CycleItem;
|
|
||||||
import de.studiocode.invui.item.impl.SimpleItem;
|
|
||||||
import net.artelnatif.nicko.NickoBukkit;
|
import net.artelnatif.nicko.NickoBukkit;
|
||||||
import net.artelnatif.nicko.disguise.NickoProfile;
|
import net.artelnatif.nicko.disguise.NickoProfile;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.Sound;
|
import org.bukkit.Sound;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
import xyz.xenondevs.invui.item.ItemProvider;
|
||||||
|
import xyz.xenondevs.invui.item.builder.ItemBuilder;
|
||||||
|
import xyz.xenondevs.invui.item.impl.AbstractItem;
|
||||||
|
import xyz.xenondevs.invui.item.impl.CycleItem;
|
||||||
|
import xyz.xenondevs.invui.item.impl.SimpleItem;
|
||||||
|
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ public class BungeeCordCycling {
|
||||||
getItemProviderForValue(false)
|
getItemProviderForValue(false)
|
||||||
};
|
};
|
||||||
|
|
||||||
public BaseItem get(Player player) {
|
public AbstractItem get(Player player) {
|
||||||
final Optional<NickoProfile> profile = NickoBukkit.getInstance().getDataStore().getData(player.getUniqueId());
|
final Optional<NickoProfile> profile = NickoBukkit.getInstance().getDataStore().getData(player.getUniqueId());
|
||||||
if (profile.isPresent()) {
|
if (profile.isPresent()) {
|
||||||
final NickoProfile nickoProfile = profile.get();
|
final NickoProfile nickoProfile = profile.get();
|
||||||
|
|
|
@ -1,23 +1,26 @@
|
||||||
package net.artelnatif.nicko.gui.items.settings;
|
package net.artelnatif.nicko.gui.items.settings;
|
||||||
|
|
||||||
import de.studiocode.invui.item.ItemProvider;
|
|
||||||
import de.studiocode.invui.item.builder.ItemBuilder;
|
|
||||||
import de.studiocode.invui.item.impl.BaseItem;
|
|
||||||
import de.studiocode.invui.item.impl.CycleItem;
|
|
||||||
import de.studiocode.invui.item.impl.SimpleItem;
|
|
||||||
import net.artelnatif.nicko.NickoBukkit;
|
import net.artelnatif.nicko.NickoBukkit;
|
||||||
import net.artelnatif.nicko.disguise.NickoProfile;
|
import net.artelnatif.nicko.disguise.NickoProfile;
|
||||||
import net.artelnatif.nicko.i18n.Locale;
|
import net.artelnatif.nicko.i18n.Locale;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.Sound;
|
import org.bukkit.Sound;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
import xyz.xenondevs.invui.item.ItemProvider;
|
||||||
|
import xyz.xenondevs.invui.item.builder.ItemBuilder;
|
||||||
|
import xyz.xenondevs.invui.item.impl.AbstractItem;
|
||||||
|
import xyz.xenondevs.invui.item.impl.CycleItem;
|
||||||
|
import xyz.xenondevs.invui.item.impl.SimpleItem;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
public class LanguageCycling {
|
public class LanguageCycling {
|
||||||
private final ItemProvider[] providers = getItems();
|
private final ItemProvider[] providers = getItems();
|
||||||
|
|
||||||
public BaseItem get(Player player) {
|
public AbstractItem get(Player player) {
|
||||||
final Optional<NickoProfile> profile = NickoBukkit.getInstance().getDataStore().getData(player.getUniqueId());
|
final Optional<NickoProfile> profile = NickoBukkit.getInstance().getDataStore().getData(player.getUniqueId());
|
||||||
if (profile.isPresent()) {
|
if (profile.isPresent()) {
|
||||||
final NickoProfile nickoProfile = profile.get();
|
final NickoProfile nickoProfile = profile.get();
|
||||||
|
|
|
@ -1,24 +1,17 @@
|
||||||
package net.artelnatif.nicko.gui.items.settings;
|
package net.artelnatif.nicko.gui.items.settings;
|
||||||
|
|
||||||
import de.studiocode.invui.item.ItemProvider;
|
|
||||||
import de.studiocode.invui.item.builder.ItemBuilder;
|
|
||||||
import de.studiocode.invui.item.impl.BaseItem;
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
import xyz.xenondevs.invui.item.builder.ItemBuilder;
|
||||||
import org.bukkit.event.inventory.ClickType;
|
import xyz.xenondevs.invui.item.impl.SuppliedItem;
|
||||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
|
|
||||||
public class OptionUnavailable extends BaseItem {
|
public class OptionUnavailable extends SuppliedItem {
|
||||||
@Override
|
public OptionUnavailable() {
|
||||||
public ItemProvider getItemProvider() {
|
super(() -> {
|
||||||
final ItemBuilder builder = new ItemBuilder(Material.RED_TERRACOTTA);
|
final ItemBuilder builder = new ItemBuilder(Material.RED_TERRACOTTA);
|
||||||
builder.setDisplayName("§cOption unavailable :(");
|
builder.setDisplayName("§cOption unavailable :(");
|
||||||
builder.addLoreLines("§7This option is disabled due to the",
|
builder.addLoreLines("§7This option is disabled due to the",
|
||||||
"§7feature it controls being disabled.");
|
"§7feature it controls being disabled.");
|
||||||
return builder;
|
return builder;
|
||||||
|
}, click -> true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void handleClick(@NotNull ClickType clickType, @NotNull Player player, @NotNull InventoryClickEvent inventoryClickEvent) { }
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,30 +1,26 @@
|
||||||
package net.artelnatif.nicko.gui.items.skin;
|
package net.artelnatif.nicko.gui.items.skin;
|
||||||
|
|
||||||
import de.studiocode.invui.item.ItemProvider;
|
|
||||||
import de.studiocode.invui.item.builder.ItemBuilder;
|
|
||||||
import de.studiocode.invui.item.impl.BaseItem;
|
|
||||||
import net.artelnatif.nicko.anvil.AnvilManager;
|
import net.artelnatif.nicko.anvil.AnvilManager;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
import org.bukkit.event.inventory.ClickType;
|
import org.bukkit.event.inventory.ClickType;
|
||||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
import xyz.xenondevs.invui.item.builder.ItemBuilder;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import xyz.xenondevs.invui.item.impl.SuppliedItem;
|
||||||
|
|
||||||
public class ChangeName extends BaseItem {
|
public class ChangeName extends SuppliedItem {
|
||||||
@Override
|
public ChangeName() {
|
||||||
public ItemProvider getItemProvider() {
|
super(() -> {
|
||||||
final ItemBuilder builder = new ItemBuilder(Material.NAME_TAG);
|
final ItemBuilder builder = new ItemBuilder(Material.NAME_TAG);
|
||||||
builder.setDisplayName("§6Name §fchange");
|
builder.setDisplayName("§6Name §fchange");
|
||||||
builder.addLoreLines("§7Only change your name.");
|
builder.addLoreLines("§7Only change your name.");
|
||||||
return builder;
|
return builder;
|
||||||
}
|
}, click -> {
|
||||||
|
final ClickType clickType = click.getClickType();
|
||||||
@Override
|
if (clickType.isLeftClick() || clickType.isRightClick()) {
|
||||||
public void handleClick(@NotNull ClickType clickType, @NotNull Player player, @NotNull InventoryClickEvent event) {
|
click.getEvent().getView().close();
|
||||||
if (clickType.isLeftClick() || clickType.isRightClick()) {
|
final AnvilManager manager = new AnvilManager(click.getPlayer());
|
||||||
event.getView().close();
|
manager.openNameAnvil();
|
||||||
final AnvilManager manager = new AnvilManager(player);
|
}
|
||||||
manager.openNameAnvil();
|
return true;
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,30 +1,26 @@
|
||||||
package net.artelnatif.nicko.gui.items.skin;
|
package net.artelnatif.nicko.gui.items.skin;
|
||||||
|
|
||||||
import de.studiocode.invui.item.ItemProvider;
|
|
||||||
import de.studiocode.invui.item.builder.ItemBuilder;
|
|
||||||
import de.studiocode.invui.item.impl.BaseItem;
|
|
||||||
import net.artelnatif.nicko.anvil.AnvilManager;
|
import net.artelnatif.nicko.anvil.AnvilManager;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
import org.bukkit.event.inventory.ClickType;
|
import org.bukkit.event.inventory.ClickType;
|
||||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
import xyz.xenondevs.invui.item.builder.ItemBuilder;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import xyz.xenondevs.invui.item.impl.SuppliedItem;
|
||||||
|
|
||||||
public class ChangeNameAndSkin extends BaseItem {
|
public class ChangeNameAndSkin extends SuppliedItem {
|
||||||
@Override
|
public ChangeNameAndSkin() {
|
||||||
public ItemProvider getItemProvider() {
|
super(() -> {
|
||||||
final ItemBuilder builder = new ItemBuilder(Material.ENDER_PEARL);
|
final ItemBuilder builder = new ItemBuilder(Material.ENDER_PEARL);
|
||||||
builder.setDisplayName("§6Skin §fand §6name §fchange");
|
builder.setDisplayName("§6Skin §fand §6name §fchange");
|
||||||
builder.addLoreLines("§7Change both your skin and name.");
|
builder.addLoreLines("§7Change both your skin and name.");
|
||||||
return builder;
|
return builder;
|
||||||
}
|
}, click -> {
|
||||||
|
final ClickType clickType = click.getClickType();
|
||||||
@Override
|
if (clickType.isLeftClick() || clickType.isRightClick()) {
|
||||||
public void handleClick(@NotNull ClickType clickType, @NotNull Player player, @NotNull InventoryClickEvent event) {
|
click.getEvent().getView().close();
|
||||||
if (clickType.isLeftClick() || clickType.isRightClick()) {
|
final AnvilManager manager = new AnvilManager(click.getPlayer());
|
||||||
event.getView().close();
|
manager.openNameThenSkinAnvil();
|
||||||
final AnvilManager manager = new AnvilManager(player);
|
}
|
||||||
manager.openNameThenSkinAnvil();
|
return true;
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,30 +1,26 @@
|
||||||
package net.artelnatif.nicko.gui.items.skin;
|
package net.artelnatif.nicko.gui.items.skin;
|
||||||
|
|
||||||
import de.studiocode.invui.item.ItemProvider;
|
|
||||||
import de.studiocode.invui.item.builder.ItemBuilder;
|
|
||||||
import de.studiocode.invui.item.impl.BaseItem;
|
|
||||||
import net.artelnatif.nicko.anvil.AnvilManager;
|
import net.artelnatif.nicko.anvil.AnvilManager;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
import org.bukkit.event.inventory.ClickType;
|
import org.bukkit.event.inventory.ClickType;
|
||||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
import xyz.xenondevs.invui.item.builder.ItemBuilder;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import xyz.xenondevs.invui.item.impl.SuppliedItem;
|
||||||
|
|
||||||
public class ChangeSkin extends BaseItem {
|
public class ChangeSkin extends SuppliedItem {
|
||||||
@Override
|
public ChangeSkin() {
|
||||||
public ItemProvider getItemProvider() {
|
super(() -> {
|
||||||
final ItemBuilder builder = new ItemBuilder(Material.PAINTING);
|
final ItemBuilder builder = new ItemBuilder(Material.ENDER_PEARL);
|
||||||
builder.setDisplayName("§6Skin §fchange");
|
builder.setDisplayName("§6Skin §fchange");
|
||||||
builder.addLoreLines("§7Only change your skin.");
|
builder.addLoreLines("§7Only change your skin.");
|
||||||
return builder;
|
return builder;
|
||||||
}
|
}, click -> {
|
||||||
|
final ClickType clickType = click.getClickType();
|
||||||
@Override
|
if (clickType.isLeftClick() || clickType.isRightClick()) {
|
||||||
public void handleClick(@NotNull ClickType clickType, @NotNull Player player, @NotNull InventoryClickEvent event) {
|
click.getEvent().getView().close();
|
||||||
if(clickType.isLeftClick() || clickType.isRightClick()) {
|
final AnvilManager manager = new AnvilManager(click.getPlayer());
|
||||||
event.getView().close();
|
manager.openSkinAnvil();
|
||||||
final AnvilManager manager = new AnvilManager(player);
|
}
|
||||||
manager.openSkinAnvil();
|
return true;
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package net.artelnatif.nicko.i18n;
|
package net.artelnatif.nicko.i18n;
|
||||||
|
|
||||||
import com.github.jsixface.YamlConfig;
|
import com.github.jsixface.YamlConfig;
|
||||||
import de.studiocode.invui.util.IOUtils;
|
import xyz.xenondevs.invui.util.IOUtils;
|
||||||
import net.artelnatif.nicko.NickoBukkit;
|
import net.artelnatif.nicko.NickoBukkit;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
|
|
@ -3,8 +3,10 @@ package net.artelnatif.nicko.impl;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
|
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
public class InternalsProvider {
|
public class InternalsProvider {
|
||||||
|
private static final Logger logger = Logger.getLogger("Internals");
|
||||||
private static Internals internals;
|
private static Internals internals;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
|
@ -14,6 +16,7 @@ public class InternalsProvider {
|
||||||
final String fullClassName = packageName + "." + bukkitVersion;
|
final String fullClassName = packageName + "." + bukkitVersion;
|
||||||
final Class<?> clazz = Class.forName(fullClassName);
|
final Class<?> clazz = Class.forName(fullClassName);
|
||||||
internals = (Internals) clazz.getConstructors()[0].newInstance();
|
internals = (Internals) clazz.getConstructors()[0].newInstance();
|
||||||
|
logger.info("Loaded support for " + bukkitVersion);
|
||||||
} catch (InvocationTargetException | ClassNotFoundException | InstantiationException | IllegalAccessException |
|
} catch (InvocationTargetException | ClassNotFoundException | InstantiationException | IllegalAccessException |
|
||||||
ClassCastException exception) {
|
ClassCastException exception) {
|
||||||
internals = null;
|
internals = null;
|
||||||
|
|
4
pom.xml
4
pom.xml
|
@ -29,7 +29,7 @@
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<maven.compiler.source>1.8</maven.compiler.source>
|
<maven.compiler.source>11</maven.compiler.source>
|
||||||
<maven.compiler.target>1.8</maven.compiler.target>
|
<maven.compiler.target>11</maven.compiler.target>
|
||||||
</properties>
|
</properties>
|
||||||
</project>
|
</project>
|
|
@ -89,6 +89,7 @@ public class v1_19_R3 implements Internals {
|
||||||
final PropertyMap properties = gameProfile.getProperties();
|
final PropertyMap properties = gameProfile.getProperties();
|
||||||
properties.removeAll("textures");
|
properties.removeAll("textures");
|
||||||
properties.put("textures", new Property("textures", skin.getValue(), skin.getSignature()));
|
properties.put("textures", new Property("textures", skin.getValue(), skin.getSignature()));
|
||||||
|
updateSelf(player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,7 +123,6 @@ public class v1_19_R3 implements Internals {
|
||||||
onlinePlayer.connection.send(remove);
|
onlinePlayer.connection.send(remove);
|
||||||
onlinePlayer.connection.send(init);
|
onlinePlayer.connection.send(init);
|
||||||
});
|
});
|
||||||
updateSelf(player);
|
|
||||||
// TODO: 3/17/23 Update signature to avoid duplicate for loop
|
// TODO: 3/17/23 Update signature to avoid duplicate for loop
|
||||||
updateOthers(player);
|
updateOthers(player);
|
||||||
return new ActionResult<>();
|
return new ActionResult<>();
|
||||||
|
|
Loading…
Reference in a new issue