1.1.3
Fixed: - Arms must now be empty to remove them.
This commit is contained in:
1 parent
b8b246cb16
commit
2502ceab44
2 files changed
+26
-4
No files matched your search
@@ -13,7 +13,7 @@
|
||||
|
||||
<groupId>com.rsscripting</groupId>
|
||||
<artifactId>rs-mobstand</artifactId>
|
||||
<version>1.1.2</version>
|
||||
<version>1.1.3</version>
|
||||
|
||||
<name>RS-MobStand</name>
|
||||
|
||||
|
||||
@@ -829,9 +829,31 @@ public class MenuListener implements Listener {
|
||||
|
||||
}
|
||||
|
||||
// Arms toggle
|
||||
// Arms toggle
|
||||
if (event.getSlot() == 22) {
|
||||
|
||||
boolean mainHandOccupied =
|
||||
!armorStand.getEquipment()
|
||||
.getItemInMainHand()
|
||||
.getType()
|
||||
.isAir();
|
||||
|
||||
boolean offHandOccupied =
|
||||
!armorStand.getEquipment()
|
||||
.getItemInOffHand()
|
||||
.getType()
|
||||
.isAir();
|
||||
|
||||
if (mainHandOccupied || offHandOccupied) {
|
||||
|
||||
player.sendMessage(
|
||||
ChatColor.RED
|
||||
+ "You must remove all items from the MobStand's hands before disabling its arms."
|
||||
);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
boolean arms =
|
||||
armorStand.hasArms();
|
||||
|
||||
@@ -842,9 +864,9 @@ public class MenuListener implements Listener {
|
||||
player.sendMessage(
|
||||
arms
|
||||
? ChatColor.GREEN
|
||||
+ "MobStand arms enabled."
|
||||
+ "MobStand arms added."
|
||||
: ChatColor.GREEN
|
||||
+ "MobStand arms disabled."
|
||||
+ "MobStand arms removed."
|
||||
);
|
||||
|
||||
StandMenu.open(
|
||||
|
||||
Reference in new issue
Block a user