Mirror von
https://github.com/St3venAU/ArmorStandTools.git
synchronisiert 2024-12-28 04:20:08 +01:00
v2.4.1 Bugfix
Dieser Commit ist enthalten in:
Ursprung
d286456489
Commit
03ed547630
@ -97,7 +97,7 @@ class ArmorStandGUI implements Listener {
|
|||||||
case INVUL:
|
case INVUL:
|
||||||
return Utils.setLore(item, ChatColor.AQUA + Config.invul + ": " + (Main.nms.isInvulnerable(as) ? (ChatColor.GREEN + Config.isOn) : (ChatColor.RED + Config.isOff)));
|
return Utils.setLore(item, ChatColor.AQUA + Config.invul + ": " + (Main.nms.isInvulnerable(as) ? (ChatColor.GREEN + Config.isOn) : (ChatColor.RED + Config.isOff)));
|
||||||
case SLOTS:
|
case SLOTS:
|
||||||
return Utils.setLore(item, ChatColor.AQUA + Config.equip + ": " + (Main.nms.getDisabledSlots(as) == 2039583 ? (ChatColor.GREEN + Config.locked) : (ChatColor.RED + Config.unLocked)));
|
return Utils.setLore(item, ChatColor.AQUA + Config.equip + ": " + (Main.nms.equipmentLocked(as) ? (ChatColor.GREEN + Config.locked) : (ChatColor.RED + Config.unLocked)));
|
||||||
case NAME:
|
case NAME:
|
||||||
return Utils.setLore(item, ChatColor.AQUA + Config.currently + ": " + (as.getCustomName() == null ? (ChatColor.BLUE + Config.none) : (ChatColor.GREEN + as.getCustomName())));
|
return Utils.setLore(item, ChatColor.AQUA + Config.currently + ": " + (as.getCustomName() == null ? (ChatColor.BLUE + Config.none) : (ChatColor.GREEN + as.getCustomName())));
|
||||||
case PHEAD:
|
case PHEAD:
|
||||||
|
@ -100,12 +100,16 @@ abstract class NMS {
|
|||||||
}
|
}
|
||||||
f.setAccessible(true);
|
f.setAccessible(true);
|
||||||
try {
|
try {
|
||||||
f.set(nmsEntity, slotsDisabled ? 2039583 : 0);
|
f.set(nmsEntity, slotsDisabled ? 0xFFFFFF : 0);
|
||||||
} catch (IllegalAccessException e) {
|
} catch (IllegalAccessException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean equipmentLocked(ArmorStand as) {
|
||||||
|
return getDisabledSlots(as) == 0xFFFFFF;
|
||||||
|
}
|
||||||
|
|
||||||
Object getNmsEntity(org.bukkit.entity.Entity entity) {
|
Object getNmsEntity(org.bukkit.entity.Entity entity) {
|
||||||
try {
|
try {
|
||||||
return entity.getClass().getMethod("getHandle").invoke(entity);
|
return entity.getClass().getMethod("getHandle").invoke(entity);
|
||||||
@ -382,7 +386,7 @@ abstract class NMS {
|
|||||||
clone.setCustomName(as.getCustomName());
|
clone.setCustomName(as.getCustomName());
|
||||||
clone.setCustomNameVisible(as.isCustomNameVisible());
|
clone.setCustomNameVisible(as.isCustomNameVisible());
|
||||||
clone.setSmall(as.isSmall());
|
clone.setSmall(as.isSmall());
|
||||||
setSlotsDisabled(clone, getDisabledSlots(as) == 2039583);
|
setSlotsDisabled(clone, getDisabledSlots(as) == 0xFFFFFF);
|
||||||
setInvulnerable(clone, isInvulnerable(as));
|
setInvulnerable(clone, isInvulnerable(as));
|
||||||
if(Main.nms.supportsScoreboardTags()) {
|
if(Main.nms.supportsScoreboardTags()) {
|
||||||
ArmorStandCmd.cloneASCommand(as, clone);
|
ArmorStandCmd.cloneASCommand(as, clone);
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
# Main Config
|
# Main Config
|
||||||
#
|
#
|
||||||
# File generated by: v2.4.1
|
# File generated by: v2.4.2
|
||||||
# (If this is not the version you are running, consider deleting this
|
# (If this is not the version you are running, consider deleting this
|
||||||
# config to allow it to be re-created. There may be new config options)
|
# config to allow it to be re-created. There may be new config options)
|
||||||
#
|
#
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
# Language Config
|
# Language Config
|
||||||
#
|
#
|
||||||
# File generated by: v2.4.1
|
# File generated by: v2.4.2
|
||||||
# (If this is not the version you are running, consider deleting this
|
# (If this is not the version you are running, consider deleting this
|
||||||
# config to allow it to be re-created. There may be new config options)
|
# config to allow it to be re-created. There may be new config options)
|
||||||
#
|
#
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
main: com.gmail.St3venAU.plugins.ArmorStandTools.Main
|
main: com.gmail.St3venAU.plugins.ArmorStandTools.Main
|
||||||
name: ArmorStandTools
|
name: ArmorStandTools
|
||||||
version: 2.4.1
|
version: 2.4.2
|
||||||
author: St3venAU
|
author: St3venAU
|
||||||
description: Armor stand manipulation tools
|
description: Armor stand manipulation tools
|
||||||
softdepend: [WorldGuard, PlotSquared]
|
softdepend: [WorldGuard, PlotSquared]
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren