Skip to content

Commit 29047a6

Browse files
committed
2 parents a54a914 + 0645f77 commit 29047a6

2 files changed

Lines changed: 19 additions & 1 deletion

File tree

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@
134134
<plugin>
135135
<groupId>org.apache.maven.plugins</groupId>
136136
<artifactId>maven-surefire-plugin</artifactId>
137-
<version>3.5.4</version>
137+
<version>3.5.5</version>
138138
</plugin>
139139
<plugin>
140140
<groupId>org.apache.maven.plugins</groupId>

src/main/java/com/griefprevention/commands/UnifiedAdminClaimCommand.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,17 @@ private boolean handleList(CommandSender sender, String[] args) {
351351
}
352352

353353
private boolean handleBlocks(CommandSender sender, String[] args) {
354+
// Look, I really don't want to fix permissions of dynamic cmd and plugin.yml and alias perms stuff: (unifiedcommandhandler.java)
355+
// So I will assume this is the ONLY command that has a perms glitch and just stubbornly fix it in this brutal hardcoded way of checking onCommand
356+
// Idk why I even have to do this, original code doesn't need checks here
357+
// But I didn't modify any other /com/griefprevention/commands files so idk why I still have to
358+
if (sender instanceof Player player) { // only check on player, console is good
359+
if (!player.hasPermission("griefprevention.adjustclaimblocks")) { // REMEMBER TO GET A BETER SOLUTION LATER
360+
GriefPrevention.sendMessage(player, TextMode.Err, Messages.NoPermissionForCommand); // THIS IS ABSOLUTE AHH
361+
return true;
362+
}
363+
}
364+
354365
// Usage: /aclaim blocks <bonus|accrued> <player|all> <amount>
355366
if (args.length < 3) {
356367
if (sender instanceof Player) {
@@ -365,6 +376,13 @@ private boolean handleBlocks(CommandSender sender, String[] args) {
365376
return true;
366377
}
367378

379+
if (sender instanceof Player player) { // REMEMBER TO GET A BETER SOLUTION LATER THIS IS ABSOLUTE AHH
380+
if (!player.hasPermission("griefprevention.adjustclaimblocks")) { // garbage vro
381+
GriefPrevention.sendMessage(player, TextMode.Err, Messages.NoPermissionForCommand);
382+
return true;
383+
}
384+
}
385+
368386
String type = args[0].toLowerCase();
369387
String target = args[1];
370388
int amount;

0 commit comments

Comments
 (0)