New player data handling added (WIP)
This commit is contained in:
parent
caa63f7912
commit
c810053558
6 changed files with 110 additions and 111 deletions
|
@ -1,78 +1,104 @@
|
||||||
package buttondevteam.chat;
|
package buttondevteam.chat;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.OfflinePlayer;
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import buttondevteam.chat.formatting.ChatFormatter;
|
import buttondevteam.chat.formatting.ChatFormatter;
|
||||||
import buttondevteam.lib.TBMCPlayer;
|
import buttondevteam.lib.TBMCPlayer;
|
||||||
|
|
||||||
public class ChatPlayer extends TBMCPlayer {
|
public class ChatPlayer extends TBMCPlayer {
|
||||||
public String UserName;
|
public String getUserName() {
|
||||||
public List<String> UserNames;
|
return getData();
|
||||||
private short FlairTime;
|
}
|
||||||
public FlairStates FlairState;
|
|
||||||
|
public void setUserName(String name) {
|
||||||
|
setData(name);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getUserNames() {
|
||||||
|
return getData();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserNames(List<String> names) {
|
||||||
|
setData(names);
|
||||||
|
}
|
||||||
|
|
||||||
|
public short getFlairTime() {
|
||||||
|
return getData();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setFlairTime(short time) {
|
||||||
|
setData(time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public FlairStates getFlairState() {
|
||||||
|
return getData();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFlairState(FlairStates state) {
|
||||||
|
setData(state);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getFCount() {
|
||||||
|
return getData();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFCount(int count) {
|
||||||
|
setData(count);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getFDeaths() {
|
||||||
|
return getData();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFDeaths(int count) {
|
||||||
|
setData(count);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean getFlairCheater() {
|
||||||
|
return getData();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setFlairCheater(boolean cheater) {
|
||||||
|
setData(cheater);
|
||||||
|
}
|
||||||
|
|
||||||
public boolean RPMode = true;
|
public boolean RPMode = true;
|
||||||
public boolean PressedF;
|
public boolean PressedF;
|
||||||
public Location SavedLocation;
|
public Location SavedLocation;
|
||||||
public boolean Working;
|
public boolean Working;
|
||||||
// public int Tables = 10;
|
// public int Tables = 10;
|
||||||
public Channel CurrentChannel = Channel.GlobalChat;
|
public Channel CurrentChannel = Channel.GlobalChat;
|
||||||
public int FCount;
|
|
||||||
public boolean SendingLink = false;
|
public boolean SendingLink = false;
|
||||||
public int FDeaths;
|
|
||||||
public boolean RainbowPresserColorMode = false;
|
public boolean RainbowPresserColorMode = false;
|
||||||
public ChatFormatter.Color OtherColorMode = null;
|
public ChatFormatter.Color OtherColorMode = null;
|
||||||
public boolean ChatOnly = false;
|
public boolean ChatOnly = false;
|
||||||
public boolean FlairCheater = false;
|
|
||||||
public int LoginWarningCount = 0;
|
public int LoginWarningCount = 0;
|
||||||
|
|
||||||
public static final short FlairTimeNonPresser = -1;
|
public static final short FlairTimeNonPresser = -1;
|
||||||
public static final short FlairTimeCantPress = -2;
|
public static final short FlairTimeCantPress = -2;
|
||||||
public static final short FlairTimeNone = -3;
|
public static final short FlairTimeNone = -3;
|
||||||
|
|
||||||
public static HashMap<UUID, ChatPlayer> OnlinePlayers = new HashMap<>();
|
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
public static ChatPlayer GetFromName(String name) {
|
|
||||||
OfflinePlayer p = Bukkit.getOfflinePlayer(name);
|
|
||||||
if (p != null) {
|
|
||||||
if (!ChatPlayer.OnlinePlayers.containsKey(p.getUniqueId())) {
|
|
||||||
TBMCPlayer player = TBMCPlayer.LoadPlayer(p);
|
|
||||||
if (player == null) {
|
|
||||||
Bukkit.getServer().getLogger()
|
|
||||||
.warning("Can't load player " + p.getUniqueId() + " - " + p.getName());
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return ChatPlayer.OnlinePlayers.get(player.UUID);
|
|
||||||
}
|
|
||||||
return ChatPlayer.OnlinePlayers.get(p.getUniqueId());
|
|
||||||
} else
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String GetFormattedFlair() {
|
public String GetFormattedFlair() {
|
||||||
if (FlairTime == FlairTimeCantPress)
|
if (getFlairTime() == FlairTimeCantPress)
|
||||||
return String.format("§r(--s)§r");
|
return String.format("§r(--s)§r");
|
||||||
if (FlairTime == FlairTimeNonPresser)
|
if (getFlairTime() == FlairTimeNonPresser)
|
||||||
return String.format("§7(--s)§r");
|
return String.format("§7(--s)§r");
|
||||||
if (FlairTime == FlairTimeNone)
|
if (getFlairTime() == FlairTimeNone)
|
||||||
return "";
|
return "";
|
||||||
return String.format("§%x(%ss)§r", GetFlairColor(), FlairTime);
|
return String.format("§%x(%ss)§r", GetFlairColor(), getFlairTime());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetFlair(short time) {
|
public void SetFlair(short time) {
|
||||||
FlairTime = time;
|
setFlairTime(time);
|
||||||
FlairUpdate();
|
FlairUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetFlair(short time, boolean cheater) {
|
public void SetFlair(short time, boolean cheater) {
|
||||||
FlairTime = time;
|
setFlairTime(time);
|
||||||
FlairCheater = cheater;
|
setFlairCheater(cheater);
|
||||||
FlairUpdate();
|
FlairUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,38 +106,30 @@ public class ChatPlayer extends TBMCPlayer {
|
||||||
|
|
||||||
// Flairs from Command Block The Button - Teams
|
// Flairs from Command Block The Button - Teams
|
||||||
// PluginMain.Instance.getServer().getScoreboardManager().getMainScoreboard().getTeams().add()
|
// PluginMain.Instance.getServer().getScoreboardManager().getMainScoreboard().getTeams().add()
|
||||||
Player p = Bukkit.getPlayer(UUID);
|
Player p = Bukkit.getPlayer(getUuid());
|
||||||
if (p != null)
|
if (p != null)
|
||||||
p.setPlayerListName(String.format("%s%s", p.getName(), GetFormattedFlair()));
|
p.setPlayerListName(String.format("%s%s", p.getName(), GetFormattedFlair()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public short GetFlairColor() {
|
public short GetFlairColor() {
|
||||||
if (FlairCheater)
|
if (getFlairCheater())
|
||||||
return 0x5;
|
return 0x5;
|
||||||
if (FlairTime == -1)
|
if (getFlairTime() == -1)
|
||||||
return 0x7;
|
return 0x7;
|
||||||
else if (FlairTime == -2)
|
else if (getFlairTime() == -2)
|
||||||
return 0xf;
|
return 0xf;
|
||||||
else if (FlairTime <= 60 && FlairTime >= 52)
|
else if (getFlairTime() <= 60 && getFlairTime() >= 52)
|
||||||
return 0x5;
|
return 0x5;
|
||||||
else if (FlairTime <= 51 && FlairTime >= 42)
|
else if (getFlairTime() <= 51 && getFlairTime() >= 42)
|
||||||
return 0x9;
|
return 0x9;
|
||||||
else if (FlairTime <= 41 && FlairTime >= 32)
|
else if (getFlairTime() <= 41 && getFlairTime() >= 32)
|
||||||
return 0xa;
|
return 0xa;
|
||||||
else if (FlairTime <= 31 && FlairTime >= 22)
|
else if (getFlairTime() <= 31 && getFlairTime() >= 22)
|
||||||
return 0xe;
|
return 0xe;
|
||||||
else if (FlairTime <= 21 && FlairTime >= 11)
|
else if (getFlairTime() <= 21 && getFlairTime() >= 11)
|
||||||
return 0x6;
|
return 0x6;
|
||||||
else if (FlairTime <= 11 && FlairTime >= 0)
|
else if (getFlairTime() <= 11 && getFlairTime() >= 0)
|
||||||
return 0xc;
|
return 0xc;
|
||||||
return 0xf;
|
return 0xf;
|
||||||
}
|
}
|
||||||
|
|
||||||
public short GetFlairTime() {
|
|
||||||
return FlairTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static ChatPlayer GetFromPlayer(Player p) {
|
|
||||||
return ChatPlayer.OnlinePlayers.get(p.getUniqueId());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,6 +26,7 @@ import buttondevteam.chat.formatting.TellrawEvent;
|
||||||
import buttondevteam.chat.formatting.TellrawPart;
|
import buttondevteam.chat.formatting.TellrawPart;
|
||||||
import buttondevteam.chat.formatting.TellrawSerializableEnum;
|
import buttondevteam.chat.formatting.TellrawSerializableEnum;
|
||||||
import buttondevteam.chat.formatting.TellrawSerializer;
|
import buttondevteam.chat.formatting.TellrawSerializer;
|
||||||
|
import buttondevteam.lib.TBMCPlayer;
|
||||||
import buttondevteam.chat.formatting.ChatFormatter.Color;
|
import buttondevteam.chat.formatting.ChatFormatter.Color;
|
||||||
import buttondevteam.chat.formatting.ChatFormatter.Priority;
|
import buttondevteam.chat.formatting.ChatFormatter.Priority;
|
||||||
|
|
||||||
|
@ -55,13 +56,13 @@ public class ChatProcessing {
|
||||||
|
|
||||||
ChatPlayer mp = null;
|
ChatPlayer mp = null;
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
mp = ChatPlayer.OnlinePlayers.get(player.getUniqueId());
|
mp = TBMCPlayer.getPlayer(player).asPluginPlayer(ChatPlayer.class);
|
||||||
if (message.equalsIgnoreCase("F")) {
|
if (message.equalsIgnoreCase("F")) {
|
||||||
if (!mp.PressedF && PlayerListener.ActiveF) {
|
if (!mp.PressedF && PlayerListener.ActiveF) {
|
||||||
PlayerListener.FCount++;
|
PlayerListener.FCount++;
|
||||||
mp.PressedF = true;
|
mp.PressedF = true;
|
||||||
if (PlayerListener.FPlayer != null && PlayerListener.FPlayer.FCount < Integer.MAX_VALUE - 1)
|
if (PlayerListener.FPlayer != null && PlayerListener.FPlayer.getFCount() < Integer.MAX_VALUE - 1)
|
||||||
PlayerListener.FPlayer.FCount++;
|
PlayerListener.FPlayer.setFCount(PlayerListener.FPlayer.getFCount() + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -132,7 +133,7 @@ public class ChatProcessing {
|
||||||
.warning("Error: Can't find player " + match + " but was reported as online.");
|
.warning("Error: Can't find player " + match + " but was reported as online.");
|
||||||
return "§c" + match + "§r";
|
return "§c" + match + "§r";
|
||||||
}
|
}
|
||||||
ChatPlayer mpp = ChatPlayer.GetFromPlayer(p);
|
ChatPlayer mpp = TBMCPlayer.getPlayer(p).asPluginPlayer(ChatPlayer.class);
|
||||||
if (PlayerListener.NotificationSound == null)
|
if (PlayerListener.NotificationSound == null)
|
||||||
p.playSound(p.getLocation(), Sound.ENTITY_ARROW_HIT_PLAYER, 1.0f, 0.5f); // TODO: Airhorn
|
p.playSound(p.getLocation(), Sound.ENTITY_ARROW_HIT_PLAYER, 1.0f, 0.5f); // TODO: Airhorn
|
||||||
else
|
else
|
||||||
|
@ -212,18 +213,21 @@ public class ChatProcessing {
|
||||||
.addExtra(new TellrawPart(String.format("World: %s\n",
|
.addExtra(new TellrawPart(String.format("World: %s\n",
|
||||||
(player != null ? player.getWorld().getName()
|
(player != null ? player.getWorld().getName()
|
||||||
: "-"))))
|
: "-"))))
|
||||||
.addExtra(new TellrawPart(String.format(
|
.addExtra(
|
||||||
"Respect: %s%s%s",
|
new TellrawPart(String.format("Respect: %s%s%s",
|
||||||
(mp != null ? (mp.FCount / (double) mp.FDeaths)
|
(mp != null ? (mp.getFCount()
|
||||||
: "Infinite"),
|
/ (double) mp.getFDeaths())
|
||||||
(mp != null && mp.UserName != null
|
: "Infinite"),
|
||||||
&& !mp.UserName.isEmpty()
|
(mp != null && mp.getUserName() != null
|
||||||
? "\nUserName: " + mp.UserName
|
&& !mp.getUserName().isEmpty()
|
||||||
: ""),
|
? "\nUserName: "
|
||||||
(mp != null && mp.PlayerName.equals(
|
+ mp.getUserName()
|
||||||
"\nAlpha_Bacca44") ? "\nDeaths: "
|
: ""),
|
||||||
+ PlayerListener.AlphaDeaths
|
(mp != null && mp.getPlayerName()
|
||||||
: "")))))));
|
.equals("\nAlpha_Bacca44")
|
||||||
|
? "\nDeaths: "
|
||||||
|
+ PlayerListener.AlphaDeaths
|
||||||
|
: "")))))));
|
||||||
json.addExtra(new TellrawPart("> "));
|
json.addExtra(new TellrawPart("> "));
|
||||||
long combinetime = System.nanoTime();
|
long combinetime = System.nanoTime();
|
||||||
ChatFormatter.Combine(formatters, formattedmessage, json);
|
ChatFormatter.Combine(formatters, formattedmessage, json);
|
||||||
|
|
|
@ -69,30 +69,19 @@ public class PlayerListener implements Listener {
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPlayerLoad(TBMCPlayerLoadEvent e) {
|
public void onPlayerLoad(TBMCPlayerLoadEvent e) {
|
||||||
YamlConfiguration yc = e.GetPlayerConfig();
|
YamlConfiguration yc = e.GetPlayerConfig();
|
||||||
ChatPlayer cp = e.GetPlayer().AsPluginPlayer(ChatPlayer.class);
|
ChatPlayer cp = e.GetPlayer().asPluginPlayer(ChatPlayer.class);
|
||||||
cp.UserName = yc.getString("username");
|
|
||||||
short tcp = (short) yc.getInt("flairtime");
|
short tcp = (short) yc.getInt("flairtime");
|
||||||
cp.SetFlair(tcp);
|
cp.FlairUpdate();
|
||||||
String flairstate = yc.getString("flairstate");
|
|
||||||
if (flairstate != null)
|
|
||||||
cp.FlairState = FlairStates.valueOf(flairstate);
|
|
||||||
else
|
|
||||||
cp.FlairState = FlairStates.NoComment;
|
|
||||||
cp.UserNames = yc.getStringList("usernames");
|
|
||||||
cp.FCount = yc.getInt("fcount");
|
|
||||||
cp.FDeaths = yc.getInt("fdeaths");
|
|
||||||
cp.FlairCheater = yc.getBoolean("flaircheater");
|
|
||||||
ChatPlayer.OnlinePlayers.put(cp.UUID, cp);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPlayerTBMCJoin(TBMCPlayerJoinEvent e) {
|
public void onPlayerTBMCJoin(TBMCPlayerJoinEvent e) {
|
||||||
if (essentials == null)
|
if (essentials == null)
|
||||||
essentials = ((Essentials) Bukkit.getPluginManager().getPlugin("Essentials"));
|
essentials = ((Essentials) Bukkit.getPluginManager().getPlugin("Essentials"));
|
||||||
ChatPlayer cp = ChatPlayer.OnlinePlayers.get(e.GetPlayer().UUID);
|
ChatPlayer cp = e.GetPlayer().asPluginPlayer(ChatPlayer.class);
|
||||||
Player p = Bukkit.getPlayer(cp.UUID);
|
Player p = Bukkit.getPlayer(cp.getUuid());
|
||||||
|
|
||||||
if (!cp.FlairState.equals(FlairStates.NoComment)) {
|
if (!cp.getFlairState().equals(FlairStates.NoComment)) {
|
||||||
PluginMain.ConfirmUserMessage(cp);
|
PluginMain.ConfirmUserMessage(cp);
|
||||||
Timer timer = new Timer();
|
Timer timer = new Timer();
|
||||||
PlayerJoinTimerTask tt = new PlayerJoinTimerTask() {
|
PlayerJoinTimerTask tt = new PlayerJoinTimerTask() {
|
||||||
|
@ -104,26 +93,26 @@ public class PlayerListener implements Listener {
|
||||||
tt.mp = cp;
|
tt.mp = cp;
|
||||||
timer.schedule(tt, 1000);
|
timer.schedule(tt, 1000);
|
||||||
} else {
|
} else {
|
||||||
if (cp.GetFlairTime() == 0x00)
|
if (cp.getFlairTime() == 0x00)
|
||||||
cp.SetFlair(ChatPlayer.FlairTimeNone);
|
cp.SetFlair(ChatPlayer.FlairTimeNone);
|
||||||
Timer timer = new Timer();
|
Timer timer = new Timer();
|
||||||
PlayerJoinTimerTask tt = new PlayerJoinTimerTask() {
|
PlayerJoinTimerTask tt = new PlayerJoinTimerTask() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Player player = Bukkit.getPlayer(mp.PlayerName);
|
Player player = Bukkit.getPlayer(mp.getPlayerName());
|
||||||
if (player == null)
|
if (player == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (mp.FlairState.equals(FlairStates.NoComment)) {
|
if (mp.getFlairState().equals(FlairStates.NoComment)) {
|
||||||
String json = String.format(
|
String json = String.format(
|
||||||
"[\"\",{\"text\":\"If you're from Reddit and you'd like your /r/TheButton flair displayed ingame, write your Minecraft name to \",\"color\":\"aqua\"},{\"text\":\"[this thread].\",\"color\":\"aqua\",\"clickEvent\":{\"action\":\"open_url\",\"value\":\"%s\"},\"hoverEvent\":{\"action\":\"show_text\",\"value\":{\"text\":\"\",\"extra\":[{\"text\":\"Click here to go to the Reddit thread\",\"color\":\"aqua\"}]}}}]",
|
"[\"\",{\"text\":\"If you're from Reddit and you'd like your /r/TheButton flair displayed ingame, write your Minecraft name to \",\"color\":\"aqua\"},{\"text\":\"[this thread].\",\"color\":\"aqua\",\"clickEvent\":{\"action\":\"open_url\",\"value\":\"%s\"},\"hoverEvent\":{\"action\":\"show_text\",\"value\":{\"text\":\"\",\"extra\":[{\"text\":\"Click here to go to the Reddit thread\",\"color\":\"aqua\"}]}}}]",
|
||||||
PluginMain.FlairThreadURL);
|
PluginMain.FlairThreadURL);
|
||||||
PluginMain.Instance.getServer().dispatchCommand(PluginMain.Console,
|
PluginMain.Instance.getServer().dispatchCommand(PluginMain.Console,
|
||||||
"tellraw " + mp.PlayerName + " " + json);
|
"tellraw " + mp.getPlayerName() + " " + json);
|
||||||
json = "[\"\",{\"text\":\"If you aren't from Reddit or don't want the flair, type /u ignore to prevent this message after next login.\",\"color\":\"aqua\"}]";
|
json = "[\"\",{\"text\":\"If you aren't from Reddit or don't want the flair, type /u ignore to prevent this message after next login.\",\"color\":\"aqua\"}]";
|
||||||
PluginMain.Instance.getServer().dispatchCommand(PluginMain.Console,
|
PluginMain.Instance.getServer().dispatchCommand(PluginMain.Console,
|
||||||
"tellraw " + mp.PlayerName + " " + json);
|
"tellraw " + mp.getPlayerName() + " " + json);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -154,26 +143,14 @@ public class PlayerListener implements Listener {
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPlayerSave(TBMCPlayerSaveEvent e) {
|
public void onPlayerSave(TBMCPlayerSaveEvent e) {
|
||||||
YamlConfiguration yc = e.GetPlayerConfig();
|
|
||||||
ChatPlayer cp = ChatPlayer.OnlinePlayers.get(e.GetPlayer().UUID);
|
|
||||||
yc.set("username", cp.UserName);
|
|
||||||
yc.set("flairtime", cp.GetFlairTime());
|
|
||||||
yc.set("flairstate", cp.FlairState.toString());
|
|
||||||
yc.set("usernames", cp.UserNames);
|
|
||||||
yc.set("fcount", cp.FCount);
|
|
||||||
yc.set("fdeaths", cp.FDeaths);
|
|
||||||
yc.set("flaircheater", cp.FlairCheater);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPlayerAdd(TBMCPlayerAddEvent event) {
|
public void onPlayerAdd(TBMCPlayerAddEvent event) {
|
||||||
TBMCPlayer tp = event.GetPlayer();
|
ChatPlayer cp = event.GetPlayer().asPluginPlayer(ChatPlayer.class);
|
||||||
ChatPlayer cp = new ChatPlayer();
|
|
||||||
cp.UUID = tp.UUID;
|
|
||||||
cp.SetFlair(ChatPlayer.FlairTimeNone);
|
cp.SetFlair(ChatPlayer.FlairTimeNone);
|
||||||
cp.FlairState = FlairStates.NoComment;
|
cp.setFlairState(FlairStates.NoComment);
|
||||||
cp.UserNames = new ArrayList<>();
|
cp.setUserNames(new ArrayList<>());
|
||||||
ChatPlayer.OnlinePlayers.put(cp.UUID, cp);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
|
|
|
@ -138,7 +138,7 @@ public class PluginMain extends JavaPlugin { // Translated to Java: 2015.07.15.
|
||||||
ign = ign.trim();
|
ign = ign.trim();
|
||||||
if (PlayersWithFlairs.contains(ign))
|
if (PlayersWithFlairs.contains(ign))
|
||||||
continue;
|
continue;
|
||||||
ChatPlayer mp = ChatPlayer.GetFromName(ign); // Loads player file
|
ChatPlayer mp = ChatPlayer.getFromName(ign); // Loads player file
|
||||||
if (mp == null)
|
if (mp == null)
|
||||||
continue;
|
continue;
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -19,7 +19,7 @@ public class NameCommand extends UCommandBase {
|
||||||
if (args.length == 0) {
|
if (args.length == 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
ChatPlayer mp = ChatPlayer.GetFromName(args[0]);
|
ChatPlayer mp = ChatPlayer.getFromName(args[0]);
|
||||||
if (mp == null) {
|
if (mp == null) {
|
||||||
sender.sendMessage("§cUnknown user: "
|
sender.sendMessage("§cUnknown user: "
|
||||||
+ args[0]);
|
+ args[0]);
|
||||||
|
|
|
@ -18,7 +18,7 @@ public class PlayerInfoCommand extends AdminCommandBase {
|
||||||
if (args.length == 0) {
|
if (args.length == 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
ChatPlayer p = ChatPlayer.GetFromName(args[0]);
|
ChatPlayer p = ChatPlayer.getFromName(args[0]);
|
||||||
if (p == null) {
|
if (p == null) {
|
||||||
sender.sendMessage("§cPlayer not found: " + args[0] + "§r");
|
sender.sendMessage("§cPlayer not found: " + args[0] + "§r");
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue