mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-16 14:33:09 +01:00
Add String based Action Bar API
This commit is contained in:
parent
bc72d63bfc
commit
252c3ff471
1 changed files with 24 additions and 0 deletions
24
Spigot-API-Patches/Add-String-based-Action-Bar-API.patch
Normal file
24
Spigot-API-Patches/Add-String-based-Action-Bar-API.patch
Normal file
|
@ -0,0 +1,24 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Tue, 20 Dec 2016 15:55:55 -0500
|
||||
Subject: [PATCH] Add String based Action Bar API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index bf4c31ba..a4e64535 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
|
||||
public void sendMap(MapView map);
|
||||
|
||||
// Paper start
|
||||
+ public default void sendActionBar(String message) {
|
||||
+ sendMessage(net.md_5.bungee.api.chat.TextComponent.fromLegacyText(message));
|
||||
+ }
|
||||
+ public default void sendActionBar(char alternateChar, String message) {
|
||||
+ sendMessage(net.md_5.bungee.api.chat.TextComponent.fromLegacyText(org.bukkit.ChatColor.translateAlternateColorCodes(alternateChar, message)));
|
||||
+ }
|
||||
/**
|
||||
* Sends the component to the player
|
||||
*
|
||||
--
|
Loading…
Reference in a new issue