Added WorldLabel entity for better server-side labels

This commit is contained in:
Anuken
2021-11-02 10:03:44 -04:00
parent 99d30b6351
commit b418afed63
5 changed files with 81 additions and 3 deletions

View File

@@ -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);
}