Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
/*
* Copyright (c) 2019. Starlis LLC / dba Empire Minecraft
*
* This source code is proprietary software and must not be redistributed without Starlis LLC's approval
*
*/
package EMC.extensions.org.bukkit.entity.Player;
import com.empireminecraft.data.PlayerDataKeys;
import com.empireminecraft.features.friends.FriendsList;
import com.empireminecraft.features.horses.Stable;
import com.empireminecraft.user.EmpireUser;
import com.empireminecraft.user.EmpireUserExtended;
import com.empireminecraft.util.UserUtil;
import com.empireminecraft.util.Util;
import manifold.ext.api.Extension;
import manifold.ext.api.This;
import org.bukkit.entity.Player;
@SuppressWarnings("ALL")
@Extension
public class PlayerExtensions {
public static void sendMsg(@This Player player, String msg, String cmd) {
Util.sendMsg(player, msg, cmd);
}
public static void sendMsg(@This Player player, String msg, String cmd, String tooltip) {
Util.sendMsg(player, msg, cmd, tooltip);
}
public static String getColorName(@This Player player) {
return getUser(player).getColorName();
}
public static EmpireUser getUser(@This Player player) {
return player._getData(PlayerDataKeys.DATA_INDEX_USER);
}
public static EmpireUserExtended getUserExtended(@This Player player) {
return player.getUser().extended();
}
public static FriendsList getFriendsList(@This Player player) {
return player.getUser().getFriendsList();
}
public static Stable getStable(@This Player player) {
return player._getData(PlayerDataKeys.DATA_INDEX_STABLE);
}
public static boolean isSrStaff(@This Player player) {
return UserUtil.isSrStaff(player);
}
public static boolean isStaff(@This Player player) {
return UserUtil.isStaff(player);
}
public static boolean isVanished(@This Player player) {
return UserUtil.isVanished(player);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.