From e97e1fc2962f54805524bf0d8a162a5c11822543 Mon Sep 17 00:00:00 2001 From: ervinnnc Date: Sun, 5 Apr 2020 17:42:39 +0800 Subject: [PATCH] Fixed /vr not working properly --- pom.xml | 2 +- .../com/thevoxelbox/voxelsniper/VoxelCommandManager.java | 2 ++ .../voxelsniper/command/VoxelReplaceCommand.java | 8 ++++---- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index f1fb55d8..20ae238d 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.thevoxelbox VoxelSniper - 6.1.0 + 6.1.1 jar VoxelSniper diff --git a/src/main/java/com/thevoxelbox/voxelsniper/VoxelCommandManager.java b/src/main/java/com/thevoxelbox/voxelsniper/VoxelCommandManager.java index fac07226..bbb537a3 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/VoxelCommandManager.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/VoxelCommandManager.java @@ -8,6 +8,7 @@ import com.thevoxelbox.voxelsniper.command.VoxelInkCommand; import com.thevoxelbox.voxelsniper.command.VoxelInkReplaceCommand; import com.thevoxelbox.voxelsniper.command.VoxelPerformerCommand; +import com.thevoxelbox.voxelsniper.command.VoxelReplaceCommand; import com.thevoxelbox.voxelsniper.command.VoxelSniperCommand; import com.thevoxelbox.voxelsniper.command.VoxelUndoCommand; import com.thevoxelbox.voxelsniper.command.VoxelVariablesCommand; @@ -53,6 +54,7 @@ public static void initialize() { commandManager.registerCommand(new VoxelInkCommand()); commandManager.registerCommand(new VoxelInkReplaceCommand()); commandManager.registerCommand(new VoxelPerformerCommand()); + commandManager.registerCommand(new VoxelReplaceCommand()); commandManager.registerCommand(new VoxelSniperCommand()); commandManager.registerCommand(new VoxelUndoCommand()); commandManager.registerCommand(new VoxelVariablesCommand()); diff --git a/src/main/java/com/thevoxelbox/voxelsniper/command/VoxelReplaceCommand.java b/src/main/java/com/thevoxelbox/voxelsniper/command/VoxelReplaceCommand.java index 6d2b6fc6..d57dcffe 100644 --- a/src/main/java/com/thevoxelbox/voxelsniper/command/VoxelReplaceCommand.java +++ b/src/main/java/com/thevoxelbox/voxelsniper/command/VoxelReplaceCommand.java @@ -48,8 +48,8 @@ public boolean doCommand(Player player, String[] args) { if (args.length == 0) { Block selectedBlock = new BlockHelper(player, player.getWorld()).getTargetBlock(); if (selectedBlock != null) { - snipeData.setVoxelSubstance(selectedBlock.getBlockData()); - snipeData.getVoxelMessage().voxel(); + snipeData.setReplaceSubstance(selectedBlock.getBlockData()); + snipeData.getVoxelMessage().replace(); } else { player.sendMessage(ChatColor.GOLD + "Nothing to imitate replace material. No changes were made."); } @@ -64,8 +64,8 @@ public boolean doCommand(Player player, String[] args) { } if (material != null && material.isBlock()) { - snipeData.setVoxelSubstance(material.createBlockData()); - snipeData.getVoxelMessage().voxel(); + snipeData.setReplaceSubstance(material.createBlockData()); + snipeData.getVoxelMessage().replace(); return true; } else { player.sendMessage(ChatColor.RED + "You have entered an invalid Item ID.");