MCPcopy Create free account
hub / github.com/Teneted/Tenet / setLevel

Method setLevel

src/main/java/org/bukkit/potion/Potion.java:235–239  ·  view source on GitHub ↗

Sets the level of this potion. @param level The new level of this potion

(int level)

Source from the content-addressed store, hash-verified

233 * @param level The new level of this potion
234 */
235 public void setLevel(int level) {
236 Validate.notNull(this.type, "No-effect potions don't have a level.");
237 Validate.isTrue(level > 0 && level <= 2, "Level must be between 1 and 2 for this potion");
238 this.level = level;
239 }
240
241 /**
242 * Converts this potion to a valid potion damage short, usable for potion

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected