Added WorldLabel entity for better server-side labels
This commit is contained in:
@@ -94,9 +94,7 @@ public class Menus{
|
||||
|
||||
@Remote(variants = Variant.both)
|
||||
public static void labelReliable(String message, float duration, float worldx, float worldy){
|
||||
if(message == null) return;
|
||||
|
||||
ui.showLabel(message, duration, worldx, worldy);
|
||||
label(message, duration, worldx, worldy);
|
||||
}
|
||||
|
||||
@Remote(variants = Variant.both)
|
||||
@@ -113,6 +111,15 @@ public class Menus{
|
||||
ui.hudfrag.showToast(Fonts.getGlyph(Fonts.icon, (char)unicode), text);
|
||||
}
|
||||
|
||||
//internal use only
|
||||
@Remote
|
||||
public static void removeWorldLabel(int id){
|
||||
var label = Groups.label.getByID(id);
|
||||
if(label != null){
|
||||
label.remove();
|
||||
}
|
||||
}
|
||||
|
||||
public interface MenuListener{
|
||||
void get(Player player, int option);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user