mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-11 20:13:55 +00:00
Removal of many prefixes and deprecation of FaweLocation
- Removed some prefixes to help make upstream merging a bit easier. - Replaced reflection code for titles with the regular bukkit api. - Removed FAWELocation and FAWEPlayer where it wasn't needed. - Deprecated FaweLocation since having it in the first place is very stupid. - FAWEPlayer should also be deprecated soon because the majority of that code is redundant.
This commit is contained in:
@ -66,21 +66,11 @@ public class BukkitPlayer extends FawePlayer<Player> {
|
||||
|
||||
@Override
|
||||
public void resetTitle() {
|
||||
sendTitle("","");
|
||||
parent.resetTitle();
|
||||
}
|
||||
|
||||
public void sendTitle(String title, String sub) {
|
||||
try {
|
||||
Method methodSendTitle = Player.class.getDeclaredMethod("sendTitle", String.class, String.class, int.class, int.class, int.class);
|
||||
methodSendTitle.invoke(parent, ChatColor.GOLD + title, ChatColor.GOLD + sub, 0, 70, 20);
|
||||
return;
|
||||
} catch (Throwable ignore) {
|
||||
try {
|
||||
Method methodSendTitle = Player.class.getDeclaredMethod("sendTitle", String.class, String.class);
|
||||
methodSendTitle.invoke(parent, ChatColor.GOLD + title, ChatColor.GOLD + sub);
|
||||
return;
|
||||
} catch (Throwable ignore2) {}
|
||||
}
|
||||
parent.sendTitle(ChatColor.GOLD + title, ChatColor.GOLD + sub, 0, 70, 20);
|
||||
if (console == null) {
|
||||
console = Bukkit.getConsoleSender();
|
||||
Bukkit.getServer().dispatchCommand(console, "gamerule sendCommandFeedback false");
|
||||
|
Reference in New Issue
Block a user