Last active
March 31, 2019 02:04
-
-
Save aikar/b4d93239d2cf0a960917a7eb87592d28 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 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