Skip to content

Commit

Permalink
Add permission check equipment
Browse files Browse the repository at this point in the history
Based on asedit.invisible checks
Fixes RypoFalem#37
+ version bump
  • Loading branch information
Benlier committed Nov 11, 2020
1 parent 726e19a commit 9dd4fe1
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>io.github.rypofalem.armorstandeditor</groupId>
<artifactId>armorstandeditor</artifactId>
<packaging>jar</packaging>
<version>1.16-25</version>
<version>1.16-26</version>
<name>armorstandeditor</name>
<url>http://maven.apache.org</url>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ private void resetPosition(ArmorStand armorStand) {
}

private void openEquipment(ArmorStand armorStand) {
if(!getPlayer().hasPermission("asedit.equipment")) return;
equipMenu = new EquipmentMenu(this, armorStand);
equipMenu.open();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,10 @@ private void fillInventory() {
rotate = createIcon( new ItemStack(Material.COMPASS, 1),
"rotate", "mode rotate");

equipment = createIcon(new ItemStack(Material.CHEST, 1),
"equipment", "mode equipment");
if(pe.getPlayer().hasPermission("asedit.equipment")) {
equipment = createIcon(new ItemStack(Material.CHEST, 1),
"equipment", "mode equipment");
}

copy = createIcon(new ItemStack(Material.WRITABLE_BOOK),
"copy","mode copy");
Expand Down
5 changes: 4 additions & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: ArmorStandEditor
main: io.github.rypofalem.armorstandeditor.ArmorStandEditorPlugin
version: 1.16-24
version: 1.16-26
api-version: "1.13"
website: rypofalem.github.io
author: RypoFalem
Expand All @@ -20,3 +20,6 @@ permissions:
asedit.rename:
description: Rename armorstands
default: true
asedit.equipment:
description: Access armorstand equipment GUI
default: true

0 comments on commit 9dd4fe1

Please sign in to comment.