From 5f8a55568cbcec0bd536a6ab9c0772315d62392d Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Tue, 29 Mar 2016 17:21:58 +1100 Subject: [PATCH] Fix plot rate categories --- .../intellectualcrafters/plot/commands/Rate.java | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/Core/src/main/java/com/intellectualcrafters/plot/commands/Rate.java b/Core/src/main/java/com/intellectualcrafters/plot/commands/Rate.java index eb1c78ad0..7081b4254 100644 --- a/Core/src/main/java/com/intellectualcrafters/plot/commands/Rate.java +++ b/Core/src/main/java/com/intellectualcrafters/plot/commands/Rate.java @@ -36,7 +36,6 @@ import com.intellectualcrafters.plot.util.Permissions; import com.intellectualcrafters.plot.util.TaskManager; import com.plotsquared.general.commands.Command; import com.plotsquared.general.commands.CommandDeclaration; - import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; @@ -125,21 +124,20 @@ public class Rate extends SubCommand { rating.add((i + 1) * Math.pow(10, index.getValue())); index.increment(); if (index.getValue() >= Settings.RATING_CATEGORIES.size()) { - close(); int rV = rating.getValue(); Rating result = EventUtil.manager.callRating(this.player, plot, new Rating(rV)); plot.addRating(this.player.getUUID(), result); sendMessage(this.player, C.RATING_APPLIED, plot.getId().toString()); + if (Permissions.hasPermission(this.player, "plots.comment")) { + Command command = MainCommand.getInstance().getCommand(Comment.class); + if (command != null) { + MainUtil.sendMessage(this.player, C.COMMENT_THIS, command.getUsage()); + } + } return false; } setTitle(Settings.RATING_CATEGORIES.get(index.getValue())); - if (Permissions.hasPermission(this.player, "plots.comment")) { - Command command = MainCommand.getInstance().getCommand("comment"); - if (command != null) { - MainUtil.sendMessage(this.player, C.COMMENT_THIS, command.getUsage()); - } - } - return false; + return true; } }; inventory.setItem(0, new PlotItemStack(35, (short) 12, 0, "0/8"));