mirror of
https://github.com/JEFF-Media-GbR/ChestSort.git
synced 2024-09-27 14:42:34 +02:00
Compare commits
2 Commits
eba3f13e5d
...
ac97dad5ed
Author | SHA1 | Date | |
---|---|---|---|
|
ac97dad5ed | ||
|
a43daf27d0 |
9
pom.xml
9
pom.xml
@ -9,7 +9,7 @@
|
|||||||
<name>ChestSort</name>
|
<name>ChestSort</name>
|
||||||
<url>https://www.chestsort.de</url>
|
<url>https://www.chestsort.de</url>
|
||||||
<description>Allows automatic chest sorting!</description>
|
<description>Allows automatic chest sorting!</description>
|
||||||
<version>13.6.3</version>
|
<version>13.6.4</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
@ -216,6 +216,13 @@
|
|||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.jeff-media.cesspool.modules</groupId>
|
||||||
|
<artifactId>yaml-commands</artifactId>
|
||||||
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.jeff_media</groupId>
|
<groupId>com.jeff_media</groupId>
|
||||||
<artifactId>JeffLib</artifactId>
|
<artifactId>JeffLib</artifactId>
|
||||||
|
@ -34,13 +34,15 @@ public class NewUI {
|
|||||||
String buttonName = conf.getString("slots." + slot);
|
String buttonName = conf.getString("slots." + slot);
|
||||||
//if(!player.hasPermission("chestsort.hotkey." + buttonName)) {
|
//if(!player.hasPermission("chestsort.hotkey." + buttonName)) {
|
||||||
Hotkey key = Hotkey.fromPermission(buttonName);
|
Hotkey key = Hotkey.fromPermission(buttonName);
|
||||||
if(!Hotkey.fromPermission(buttonName).hasPermission(player)) {
|
if(key != null && !Hotkey.fromPermission(buttonName).hasPermission(player)) {
|
||||||
buttonName = buttonName + "-nopermission";
|
buttonName = buttonName + "-nopermission";
|
||||||
} else {
|
} else {
|
||||||
boolean enabled = Hotkey.fromPermission(buttonName).hasEnabled(player);
|
boolean enabled = true;
|
||||||
|
if(key != null) enabled = Hotkey.fromPermission(buttonName).hasEnabled(player);
|
||||||
//System.out.println(buttonName + " is enabled: " + enabled);
|
//System.out.println(buttonName + " is enabled: " + enabled);
|
||||||
buttonName = buttonName + (enabled ? "-enabled" : "-disabled");
|
if(key != null) buttonName = buttonName + (enabled ? "-enabled" : "-disabled");
|
||||||
}
|
}
|
||||||
|
if(main.isDebug()) System.out.println("Button name: " + buttonName);
|
||||||
ItemStack button = ItemStackUtils.fromConfigurationSection(conf.getConfigurationSection("items." + buttonName));
|
ItemStack button = ItemStackUtils.fromConfigurationSection(conf.getConfigurationSection("items." + buttonName));
|
||||||
//System.out.println(button);
|
//System.out.println(button);
|
||||||
if(button.hasItemMeta() && !buttonName.endsWith("-nopermission")) {
|
if(button.hasItemMeta() && !buttonName.endsWith("-nopermission")) {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
# over and over again. I wrote a tiny explanation about them here:
|
# over and over again. I wrote a tiny explanation about them here:
|
||||||
# https://wiki.jeff-media.com/books/general-information/page/yaml-anchors
|
# https://wiki.jeff-media.com/books/general-information/page/yaml-anchors
|
||||||
|
|
||||||
# Items can be defined using the following values:
|
# Items can be defined inside the "items" section using the following values:
|
||||||
# material: DIAMOND
|
# material: DIAMOND
|
||||||
# display-name: "My Diamond"
|
# display-name: "My Diamond"
|
||||||
# lore:
|
# lore:
|
||||||
@ -27,6 +27,8 @@
|
|||||||
# console:
|
# console:
|
||||||
# - "tell {player} Hello" # command that will be run as the console
|
# - "tell {player} Hello" # command that will be run as the console
|
||||||
|
|
||||||
|
# You can then reference the item in the "slots" section using their defined name.
|
||||||
|
|
||||||
title: "<#000000>&l[<#007700>&lChest<#339933>&lSort<#000000>&l] &rSettings"
|
title: "<#000000>&l[<#007700>&lChest<#339933>&lSort<#000000>&l] &rSettings"
|
||||||
size: 45
|
size: 45
|
||||||
items:
|
items:
|
||||||
|
Loading…
Reference in New Issue
Block a user