mirror of
https://github.com/JEFF-Media-GbR/ChestSort.git
synced 2025-01-20 23:21:26 +01:00
added permission support
This commit is contained in:
parent
1d85716207
commit
4968553a4a
22
.classpath
22
.classpath
@ -1,11 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||
<attributes>
|
||||
<attribute name="module" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="lib" path="J:/BuildTools/Spigot/Spigot-API/target/spigot-api-1.13-R0.1-SNAPSHOT-shaded.jar"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||
<attributes>
|
||||
<attribute name="module" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="lib" path="/Users/alex/BuildTools/Spigot/Spigot-API/target/spigot-api-1.13-R0.1-SNAPSHOT-shaded.jar"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
12
plugin.yml
12
plugin.yml
@ -1,13 +1,19 @@
|
||||
main: de.jeffclan.JeffChestSort.JeffChestSortPlugin
|
||||
name: ChestSort
|
||||
version: 1.4
|
||||
version: 1.5
|
||||
api-version: 1.13
|
||||
description: Allows automatic chest sorting
|
||||
author: mfnalex
|
||||
website: www.jeff-media.de
|
||||
prefix: ChestSort
|
||||
prefix: ChestSort
|
||||
database: false
|
||||
commands:
|
||||
chestsort:
|
||||
description: Toggle automatic chest sorting
|
||||
usage: /<command>
|
||||
aliases: sort
|
||||
aliases: sort
|
||||
permission: chestsort.use
|
||||
permissions:
|
||||
chestsort.use:
|
||||
description: Allows usage of automatic chest sorting
|
||||
default: op
|
@ -62,6 +62,11 @@ public class JeffChestSortListener implements Listener {
|
||||
}
|
||||
|
||||
Player p = (Player) event.getPlayer();
|
||||
|
||||
if(!p.hasPermission("chestsort.use")) {
|
||||
return;
|
||||
}
|
||||
|
||||
JeffChestSortPlayerSetting setting = plugin.PerPlayerSettings.get(p.getUniqueId().toString());
|
||||
|
||||
if (!(event.getInventory().getHolder() instanceof Chest)
|
||||
|
Loading…
Reference in New Issue
Block a user