mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-14 03:35:51 -07:00
@@ -85,6 +85,22 @@ public interface Objective {
|
|||||||
*/
|
*/
|
||||||
DisplaySlot getDisplaySlot() throws IllegalStateException;
|
DisplaySlot getDisplaySlot() throws IllegalStateException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets manner in which this objective will be rendered.
|
||||||
|
*
|
||||||
|
* @param renderType new render type
|
||||||
|
* @throws IllegalStateException if this objective has been unregistered
|
||||||
|
*/
|
||||||
|
void setRenderType(RenderType renderType) throws IllegalStateException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets manner in which this objective will be rendered.
|
||||||
|
*
|
||||||
|
* @return the render type
|
||||||
|
* @throws IllegalStateException if this objective has been unregistered
|
||||||
|
*/
|
||||||
|
RenderType getRenderType() throws IllegalStateException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets a player's Score for an Objective on this Scoreboard
|
* Gets a player's Score for an Objective on this Scoreboard
|
||||||
*
|
*
|
||||||
|
@@ -0,0 +1,19 @@
|
|||||||
|
package org.bukkit.scoreboard;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Controls the way in which an {@link Objective} is rendered client side.
|
||||||
|
*
|
||||||
|
* @deprecated draft API
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public enum RenderType {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display integer value.
|
||||||
|
*/
|
||||||
|
INTEGER,
|
||||||
|
/**
|
||||||
|
* Display number of hearts corresponding to value.
|
||||||
|
*/
|
||||||
|
HEARTS;
|
||||||
|
}
|
@@ -45,6 +45,27 @@ public interface Scoreboard {
|
|||||||
*/
|
*/
|
||||||
Objective registerNewObjective(String name, String criteria, String displayName) throws IllegalArgumentException;
|
Objective registerNewObjective(String name, String criteria, String displayName) throws IllegalArgumentException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Registers an Objective on this Scoreboard
|
||||||
|
*
|
||||||
|
* @param name Name of the Objective
|
||||||
|
* @param criteria Criteria for the Objective
|
||||||
|
* @param displayName Name displayed to players for the Objective.
|
||||||
|
* @param renderType Manner of rendering the Objective
|
||||||
|
* @return The registered Objective
|
||||||
|
* @throws IllegalArgumentException if name is null
|
||||||
|
* @throws IllegalArgumentException if name is longer than 16
|
||||||
|
* characters.
|
||||||
|
* @throws IllegalArgumentException if criteria is null
|
||||||
|
* @throws IllegalArgumentException if displayName is null
|
||||||
|
* @throws IllegalArgumentException if displayName is longer than 128
|
||||||
|
* characters.
|
||||||
|
* @throws IllegalArgumentException if renderType is null
|
||||||
|
* @throws IllegalArgumentException if an objective by that name already
|
||||||
|
* exists
|
||||||
|
*/
|
||||||
|
Objective registerNewObjective(String name, String criteria, String displayName, RenderType renderType) throws IllegalArgumentException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets an Objective on this Scoreboard by name
|
* Gets an Objective on this Scoreboard by name
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user