From ef4011d73d303d8ec78c9ebd6f24c84011ae179b Mon Sep 17 00:00:00 2001 From: NorbiPeti Date: Mon, 26 Feb 2018 22:16:09 +0100 Subject: [PATCH] Fixed invocation location .5 --- .../java/io/github/norbipeti/onecommandhelper/Commands.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/io/github/norbipeti/onecommandhelper/Commands.java b/src/main/java/io/github/norbipeti/onecommandhelper/Commands.java index bebedcd..df4fd22 100644 --- a/src/main/java/io/github/norbipeti/onecommandhelper/Commands.java +++ b/src/main/java/io/github/norbipeti/onecommandhelper/Commands.java @@ -39,8 +39,8 @@ public class Commands implements CommandExecutor { return true; } CommandBlock cmdblock = (CommandBlock) block.getState(); - //acmdb.append(block.getX()).append(" ").append(block.getY()).append(" ").append(block.getZ()).append(" "); - acmdb.append("~ ~ ~ "); + acmdb.append(block.getX()).append(".5 ").append(block.getY()).append(".5 ").append(block.getZ()).append(".5 "); + //acmdb.append("~ ~ ~ "); acmdb.append(cmdblock.getCommand()); } else { sender.sendMessage("§cYou need to be a player and look at the command block where you have the command you need to run."); @@ -53,7 +53,7 @@ public class Commands implements CommandExecutor { Field f = iht.getClass().getDeclaredField("allTopics"); f.setAccessible(true); replacecmds = ((Collection) f.get(iht)).stream().filter(ht -> ht.getName().startsWith("/minecraft:")).map(ht -> ht.getName().substring("/minecraft:".length())).toArray(String[]::new); - System.out.println(Arrays.toString(replacecmds)); //TODO: Fallback method + //System.out.println(Arrays.toString(replacecmds)); //TODO: Fallback method } catch (Exception e) { sender.sendMessage("§cAn error occured while getting commands!"); e.printStackTrace();