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:
MattBDev
2019-06-05 21:17:34 -04:00
parent bf5d2c2788
commit b42553116c
21 changed files with 161 additions and 507 deletions

View File

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