mirror of
https://github.com/JEFF-Media-GbR/ChestSort.git
synced 2024-12-04 16:44:00 +01:00
11.5.3
This commit is contained in:
parent
db1ceaa809
commit
8d122d19a2
@ -1,5 +1,8 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 11.5.3
|
||||||
|
- Fixed "disabled-worlds" not working for "left-click hotkey"
|
||||||
|
|
||||||
## 11.5.1
|
## 11.5.1
|
||||||
- Added support for new Slimefun API
|
- Added support for new Slimefun API
|
||||||
|
|
||||||
|
2
pom.xml
2
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>11.5.2</version>
|
<version>11.5.3</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
@ -196,7 +196,7 @@ public class ChestSortPlugin extends JavaPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ArrayList<String> getDisabledWorlds() {
|
public ArrayList<String> getDisabledWorlds() {
|
||||||
return disabledWorlds;
|
return disabledWorlds == null ? new ArrayList<>() : disabledWorlds;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDisabledWorlds(ArrayList<String> disabledWorlds) {
|
public void setDisabledWorlds(ArrayList<String> disabledWorlds) {
|
||||||
|
@ -56,6 +56,10 @@ public class Listener implements org.bukkit.event.Listener {
|
|||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onLeftClickChest(PlayerInteractEvent event) {
|
public void onLeftClickChest(PlayerInteractEvent event) {
|
||||||
|
// checking in lower case for lazy admins
|
||||||
|
if (plugin.getDisabledWorlds().contains(event.getPlayer().getWorld().getName().toLowerCase())) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if(!event.getPlayer().hasPermission("chestsort.use")) return;
|
if(!event.getPlayer().hasPermission("chestsort.use")) return;
|
||||||
if(!event.getPlayer().hasPermission(Hotkey.getPermission(Hotkey.OUTSIDE))) return;
|
if(!event.getPlayer().hasPermission(Hotkey.getPermission(Hotkey.OUTSIDE))) return;
|
||||||
if(event.getHand() != EquipmentSlot.HAND) return;
|
if(event.getHand() != EquipmentSlot.HAND) return;
|
||||||
|
Loading…
Reference in New Issue
Block a user