I'm working on a system there connect my website with my Minecraft Server through a JavaPlugin! But I had meet some problem when I try to replace $player
in a String with my Minecraft Players Ing Name, please help :)
ResultSet results = statement.executeQuery();
if(results.next()) {
String command = ""+results.getString(2);
String newcmd = ""+command.replaceAll("\b$player\b", ""+player.getName());
System.out.println(newcmd);
player.sendMessage("\u00A75SpaceStore \u00A78\u00A7l| \u00A72Code Activated!");
}
String command is the same as "give $player stone"
Output
give $player stone