3
0
Mirror von https://github.com/St3venAU/ArmorStandTools.git synchronisiert 2024-12-29 13:00:07 +01:00

Use correct default max health

Dieser Commit ist enthalten in:
St3venAU 2015-03-11 21:09:55 +08:00
Ursprung a95f0832f4
Commit caccc66e71

Datei anzeigen

@ -236,9 +236,9 @@ public class MainListener implements Listener {
Utils.actionBarMsg(p, ChatColor.GREEN + Config.carrying); Utils.actionBarMsg(p, ChatColor.GREEN + Config.carrying);
} }
break; break;
case NODEL: case NODEL: // Developer tool - do not use
if(as.getMaxHealth() == 50) { if(as.getMaxHealth() == 50) {
as.setMaxHealth(2); as.setMaxHealth(20);
p.sendMessage(ChatColor.GREEN + "Deletion Protection: Disabled"); p.sendMessage(ChatColor.GREEN + "Deletion Protection: Disabled");
} else { } else {
as.setMaxHealth(50); as.setMaxHealth(50);
@ -455,7 +455,7 @@ public class MainListener implements Listener {
EulerAngle bo = as.getBodyPose(); EulerAngle bo = as.getBodyPose();
String cmd = String cmd =
"summon ArmorStand " + Utils.twoDec(loc.getX()) + " " + Utils.twoDec(loc.getY()) + " " + Utils.twoDec(loc.getZ()) + " {" "summon ArmorStand " + Utils.twoDec(loc.getX()) + " " + Utils.twoDec(loc.getY()) + " " + Utils.twoDec(loc.getZ()) + " {"
+ (as.getMaxHealth() != 2 ? "Attributes:[{Name:\"generic.maxHealth\", Base:" + as.getMaxHealth() + "}]," : "") + (as.getMaxHealth() != 20 ? "Attributes:[{Name:\"generic.maxHealth\", Base:" + as.getMaxHealth() + "}]," : "")
+ (as.isVisible() ? "" : "Invisible:1,") + (as.isVisible() ? "" : "Invisible:1,")
+ (as.hasBasePlate() ? "" : "NoBasePlate:1,") + (as.hasBasePlate() ? "" : "NoBasePlate:1,")
+ (as.hasGravity() ? "" : "NoGravity:1,") + (as.hasGravity() ? "" : "NoGravity:1,")
@ -587,7 +587,7 @@ public class MainListener implements Listener {
private ArmorStand getArmorStand(Block b) { private ArmorStand getArmorStand(Block b) {
UUID uuid = null; UUID uuid = null;
for (MetadataValue value : b.getMetadata("armorStand")) { for (MetadataValue value : b.getMetadata("armorStand")) {
if (value.getOwningPlugin() == this) { if (value.getOwningPlugin() == plugin) {
uuid = (UUID) value.value(); uuid = (UUID) value.value();
} }
} }