3
0
Mirror von https://github.com/St3venAU/ArmorStandTools.git synchronisiert 2024-12-29 13:00:07 +01:00

Explicitly use minecraft give command

/give would use the Essentials command (if installed) which does not support the tags after
Dieser Commit ist enthalten in:
manuelgu 2016-06-13 14:25:01 +02:00 committet von GitHub
Ursprung 148065dbdc
Commit c679d9b8f3

Datei anzeigen

@ -414,7 +414,7 @@ public class MainListener implements Listener {
if(MC_USERNAME_PATTERN.matcher(input).matches()) { if(MC_USERNAME_PATTERN.matcher(input).matches()) {
b.setMetadata("protected", new FixedMetadataValue(plugin, true)); b.setMetadata("protected", new FixedMetadataValue(plugin, true));
event.getPlayer().sendMessage(ChatColor.GOLD + Config.pleaseWait); event.getPlayer().sendMessage(ChatColor.GOLD + Config.pleaseWait);
String cmd = "give " + event.getPlayer().getName() + " minecraft:skull 1 3 {SkullOwner:\"" + input + "\"}"; String cmd = "minecraft:give " + event.getPlayer().getName() + " minecraft:skull 1 3 {SkullOwner:\"" + input + "\"}";
String current = b.getWorld().getGameRuleValue("sendCommandFeedback"); String current = b.getWorld().getGameRuleValue("sendCommandFeedback");
b.getWorld().setGameRuleValue("sendCommandFeedback", "false"); b.getWorld().setGameRuleValue("sendCommandFeedback", "false");
Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), cmd); Bukkit.getServer().dispatchCommand(Bukkit.getServer().getConsoleSender(), cmd);