Skip to content

Commit

Permalink
Fix some mistakes
Browse files Browse the repository at this point in the history
  • Loading branch information
Xenmai committed Feb 3, 2019
1 parent 8d81366 commit 165956e
Showing 1 changed file with 7 additions and 7 deletions.
Expand Up @@ -49,7 +49,7 @@ private EntityMaxFuseTicks(dEntity entity) {

@Override
public String getPropertyString() {
return entity.getBukkitEntity() instanceof Creeper ? ((Creeper) entity.getBukkitEntity()).getMaxFuseTicks() + "" : null;
return ((Creeper) entity.getBukkitEntity()).getMaxFuseTicks() + "";
}

@Override
Expand All @@ -66,13 +66,13 @@ public String getAttribute(Attribute attribute) {

// <--[tag]
// @attribute <e@entity.max_fuse_ticks>
// @returns Element(Integer)
// @returns Element(Number)
// @mechanism dEntity.max_fuse_ticks
// @group properties
// @description
// Returns the number of fuse ticks a creeper will default to when not triggered.
// Returns the default number of ticks until the creeper explodes when primed (NOT the time remaining if already primed).
// -->
if (attribute.startsWith("max_fuse_ticks") && entity.getBukkitEntity() instanceof Creeper) {
if (attribute.startsWith("max_fuse_ticks")) {
return new Element(((Creeper) entity.getBukkitEntity()).getMaxFuseTicks())
.getAttribute(attribute.fulfill(1));
}
Expand All @@ -86,13 +86,13 @@ public void adjust(Mechanism mechanism) {
// <--[mechanism]
// @object dEntity
// @name max_fuse_ticks
// @input Element(Integer)
// @input Element(Number)
// @description
// Sets the number of fuse ticks a creeper will default to when not triggered
// Sets the default number of ticks until the creeper explodes when primed (NOT the time remaining if already primed)
// @tags
// <e@entity.max_fuse_ticks>
// -->
if (mechanism.matches("max_fuse_ticks") && entity.getBukkitEntity() instanceof Creeper && mechanism.requireInteger()) {
if (mechanism.matches("max_fuse_ticks") && mechanism.requireInteger()) {
((Creeper) entity.getBukkitEntity()).setMaxFuseTicks(mechanism.getValue().asInt());
}

Expand Down

0 comments on commit 165956e

Please sign in to comment.