mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 13:16:45 +01:00
Fix plot rate categories
This commit is contained in:
parent
5275d4ec62
commit
5f8a55568c
@ -36,7 +36,6 @@ import com.intellectualcrafters.plot.util.Permissions;
|
|||||||
import com.intellectualcrafters.plot.util.TaskManager;
|
import com.intellectualcrafters.plot.util.TaskManager;
|
||||||
import com.plotsquared.general.commands.Command;
|
import com.plotsquared.general.commands.Command;
|
||||||
import com.plotsquared.general.commands.CommandDeclaration;
|
import com.plotsquared.general.commands.CommandDeclaration;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
@ -125,21 +124,20 @@ public class Rate extends SubCommand {
|
|||||||
rating.add((i + 1) * Math.pow(10, index.getValue()));
|
rating.add((i + 1) * Math.pow(10, index.getValue()));
|
||||||
index.increment();
|
index.increment();
|
||||||
if (index.getValue() >= Settings.RATING_CATEGORIES.size()) {
|
if (index.getValue() >= Settings.RATING_CATEGORIES.size()) {
|
||||||
close();
|
|
||||||
int rV = rating.getValue();
|
int rV = rating.getValue();
|
||||||
Rating result = EventUtil.manager.callRating(this.player, plot, new Rating(rV));
|
Rating result = EventUtil.manager.callRating(this.player, plot, new Rating(rV));
|
||||||
plot.addRating(this.player.getUUID(), result);
|
plot.addRating(this.player.getUUID(), result);
|
||||||
sendMessage(this.player, C.RATING_APPLIED, plot.getId().toString());
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
setTitle(Settings.RATING_CATEGORIES.get(index.getValue()));
|
setTitle(Settings.RATING_CATEGORIES.get(index.getValue()));
|
||||||
if (Permissions.hasPermission(this.player, "plots.comment")) {
|
return true;
|
||||||
Command command = MainCommand.getInstance().getCommand("comment");
|
|
||||||
if (command != null) {
|
|
||||||
MainUtil.sendMessage(this.player, C.COMMENT_THIS, command.getUsage());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
inventory.setItem(0, new PlotItemStack(35, (short) 12, 0, "0/8"));
|
inventory.setItem(0, new PlotItemStack(35, (short) 12, 0, "0/8"));
|
||||||
|
Loading…
Reference in New Issue
Block a user