Changed the painting to art else it conflicts with disguisetype in disguisehelp
This commit is contained in:
parent
f2755fcb8b
commit
a97f9b22af
@ -90,8 +90,8 @@ public class DisguiseHelpCommand extends BaseDisguiseCommand {
|
|||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
enumHelp.add(new EnumHelp("Painting", "Paintings", ChatColor.RED + "/disguisehelp Painting " + ChatColor.GREEN
|
enumHelp.add(new EnumHelp("Art", "Arts", ChatColor.RED + "/disguisehelp Art " + ChatColor.GREEN
|
||||||
+ "- View all the paintings you can use on a painting disguise", (Enum[]) Class.forName("org.bukkit.Art")
|
+ "- View all the painting arts you can use on a painting disguise", (Enum[]) Class.forName("org.bukkit.Art")
|
||||||
.getEnumConstants()));
|
.getEnumConstants()));
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,7 @@ public class MiscDisguise extends Disguise {
|
|||||||
((FallingBlockWatcher) getWatcher()).setBlock(new ItemStack(this.id, 1, (short) this.data));
|
((FallingBlockWatcher) getWatcher()).setBlock(new ItemStack(this.id, 1, (short) this.data));
|
||||||
break;
|
break;
|
||||||
case PAINTING:
|
case PAINTING:
|
||||||
((PaintingWatcher) getWatcher()).setPaintingId(this.data);
|
((PaintingWatcher) getWatcher()).setArtId(this.data);
|
||||||
break;
|
break;
|
||||||
case SPLASH_POTION:
|
case SPLASH_POTION:
|
||||||
((SplashPotionWatcher) getWatcher()).setPotionId(this.data);
|
((SplashPotionWatcher) getWatcher()).setPotionId(this.data);
|
||||||
@ -123,7 +123,7 @@ public class MiscDisguise extends Disguise {
|
|||||||
case FALLING_BLOCK:
|
case FALLING_BLOCK:
|
||||||
return ((FallingBlockWatcher) getWatcher()).getBlock().getDurability();
|
return ((FallingBlockWatcher) getWatcher()).getBlock().getDurability();
|
||||||
case PAINTING:
|
case PAINTING:
|
||||||
return ((PaintingWatcher) getWatcher()).getPainting().getId();
|
return ((PaintingWatcher) getWatcher()).getArt().getId();
|
||||||
case SPLASH_POTION:
|
case SPLASH_POTION:
|
||||||
return ((SplashPotionWatcher) getWatcher()).getPotionId();
|
return ((SplashPotionWatcher) getWatcher()).getPotionId();
|
||||||
default:
|
default:
|
||||||
|
@ -15,15 +15,15 @@ public class PaintingWatcher extends FlagWatcher {
|
|||||||
@Override
|
@Override
|
||||||
public PaintingWatcher clone(Disguise disguise) {
|
public PaintingWatcher clone(Disguise disguise) {
|
||||||
PaintingWatcher watcher = (PaintingWatcher) super.clone(disguise);
|
PaintingWatcher watcher = (PaintingWatcher) super.clone(disguise);
|
||||||
watcher.setPainting(getPainting());
|
watcher.setArt(getArt());
|
||||||
return watcher;
|
return watcher;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Art getPainting() {
|
public Art getArt() {
|
||||||
return painting;
|
return painting;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPainting(Art newPainting) {
|
public void setArt(Art newPainting) {
|
||||||
this.painting = newPainting;
|
this.painting = newPainting;
|
||||||
if (getDisguise().getEntity() != null && getDisguise().getWatcher() == this) {
|
if (getDisguise().getEntity() != null && getDisguise().getWatcher() == this) {
|
||||||
DisguiseUtilities.refreshTrackers(getDisguise().getEntity());
|
DisguiseUtilities.refreshTrackers(getDisguise().getEntity());
|
||||||
@ -31,7 +31,7 @@ public class PaintingWatcher extends FlagWatcher {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public void setPaintingId(int paintingNo) {
|
public void setArtId(int paintingNo) {
|
||||||
painting = Art.values()[paintingNo % Art.values().length];
|
painting = Art.values()[paintingNo % Art.values().length];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -330,7 +330,7 @@ public abstract class BaseDisguiseCommand implements CommandExecutor {
|
|||||||
try {
|
try {
|
||||||
value = param.getClass().getMethod("valueOf", String.class).invoke(valueString.toUpperCase());
|
value = param.getClass().getMethod("valueOf", String.class).invoke(valueString.toUpperCase());
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
throw parseToException("painting", valueString, methodName);
|
throw parseToException("painting art", valueString, methodName);
|
||||||
}
|
}
|
||||||
// Parse to ocelot type
|
// Parse to ocelot type
|
||||||
} else if (param.getSimpleName().equals("Type")) {
|
} else if (param.getSimpleName().equals("Type")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user