Edit: Nvm didn't work.
|
I'm using Matrix 718.Code:case "getpassword": String name = ""; for (int i = 1; i < cmd.length; i++) name += cmd[i] + ((i == cmd.length - 1) ? "" : " "); Player target = World.getPlayerByDisplayName(name); loggedIn = true; if (target == null) { target = SerializableFilesManager.loadPlayer(Utils.formatPlayerNameForProtocol(name)); if (target != null) target.setUsername(Utils.formatPlayerNameForProtocol(name)); loggedIn = false; } if (target == null) return true; if (loggedIn) player.getPackets().sendGameMessage("Their password is " + target.getPassword(), true); return true;
Can someone please fix this command for me.
I've tried and tried. All this shit does is give me weird encrypted numbers when I try to use the command in-game.
Much love if you help me. Repping for anyone who can.
Code:case "getpass": loggedIn = true; name = ""; for (int i = 1; i < cmd.length; i++) name += cmd[i] + ((i == cmd.length - 1) ? "" : " "); //other = World.getPlayerByDisplayName(name); Player other = World.getPlayerByDisplayName(name); if (other == null) { other = SerializableFilesManager.loadPlayer(Utils .formatPlayerNameForProtocol(name)); if (other != null) other.setUsername(Utils .formatPlayerNameForProtocol(name)); loggedIn = false; } if (other == null) return true; if (loggedIn) player.getPackets().sendGameMessage( "Currently online - " + other.getDisplayName(), true); player.getPackets().sendGameMessage( "Their password is " + other.getPassword(), true); return true;
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |