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>
|
||||
<url>https://www.chestsort.de</url>
|
||||
<description>Allows automatic chest sorting!</description>
|
||||
<version>13.6.3</version>
|
||||
<version>13.6.4</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<properties>
|
||||
@ -216,6 +216,13 @@
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.jeff-media.cesspool.modules</groupId>
|
||||
<artifactId>yaml-commands</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.jeff_media</groupId>
|
||||
<artifactId>JeffLib</artifactId>
|
||||
|
@ -34,13 +34,15 @@ public class NewUI {
|
||||
String buttonName = conf.getString("slots." + slot);
|
||||
//if(!player.hasPermission("chestsort.hotkey." + buttonName)) {
|
||||
Hotkey key = Hotkey.fromPermission(buttonName);
|
||||
if(!Hotkey.fromPermission(buttonName).hasPermission(player)) {
|
||||
if(key != null && !Hotkey.fromPermission(buttonName).hasPermission(player)) {
|
||||
buttonName = buttonName + "-nopermission";
|
||||
} 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);
|
||||
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));
|
||||
//System.out.println(button);
|
||||
if(button.hasItemMeta() && !buttonName.endsWith("-nopermission")) {
|
||||
|
@ -5,7 +5,7 @@
|
||||
# over and over again. I wrote a tiny explanation about them here:
|
||||
# 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
|
||||
# display-name: "My Diamond"
|
||||
# lore:
|
||||
@ -27,6 +27,8 @@
|
||||
# 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"
|
||||
size: 45
|
||||
items:
|
||||
|
Loading…
Reference in New Issue
Block a user