diff --git a/src/main/java/net/aufdemrand/denizen/objects/dPlayer.java b/src/main/java/net/aufdemrand/denizen/objects/dPlayer.java index 033b8fd8ff..e6eabce512 100644 --- a/src/main/java/net/aufdemrand/denizen/objects/dPlayer.java +++ b/src/main/java/net/aufdemrand/denizen/objects/dPlayer.java @@ -1464,7 +1464,7 @@ else if (getPlayerEntity().getFoodLevel() / maxHunger < 1) // @attribute // @returns Element(Number) // @description - // returns the gamemode ID of the player. 0 = survival, 1 = creative, 2 = adventure + // returns the gamemode ID of the player. 0 = survival, 1 = creative, 2 = adventure, 3 = spectator // --> if (attribute.startsWith("id")) return new Element(getPlayerEntity().getGameMode().getValue()) @@ -1858,13 +1858,26 @@ public void adjust(Mechanism mechanism) { setFlySpeed(value.asFloat()); } + // <--[mechanism] + // @object dPlayer + // @name flying + // @input Element(Boolean) + // @description + // Sets whether the player is flying. + // @tags + // + // --> + if (mechanism.matches("flying") && mechanism.requireBoolean()) { + getPlayerEntity().setFlying(value.asBoolean()); + } + // <--[mechanism] // @object dPlayer // @name gamemode // @input Element // @description // Sets the game mode of the player. - // Valid gamemodes are survival, creative, and adventure. + // Valid gamemodes are survival, creative, adventure, and spectator. // @tags // //