Finished up permissions and added messages alerting the player they're a prisoner as to not be confused by any of this stuff :P

This commit is contained in:
WildInterloper 2024-03-05 00:47:22 -05:00
parent 65b8ea6676
commit 4864c236b8
4 changed files with 9 additions and 1 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/target/

View File

@ -6,7 +6,7 @@
<groupId>me.NVus</groupId>
<artifactId>NVus_Prison_Setup</artifactId>
<version>0.1.1-SNAPSHOT</version>
<version>0.1.6-SNAPSHOT</version>
<packaging>jar</packaging>
<name>PrisonSetup</name>

View File

@ -1,5 +1,6 @@
package me.nvus.nvus_prison_setup.Listeners;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
@ -18,8 +19,11 @@ public class PlayerArmor implements Listener {
// Check if the player is an actual prisoner before cancelling ;)
if (player.hasPermission("nvus.prisoner")) {
event.setCancelled(true);
player.sendMessage(ChatColor.translateAlternateColorCodes('&',"&c&lSorry inmate! &cYou're a prisoner and cannot touch your armor!"));
}
}
}
}
}

View File

@ -1,5 +1,6 @@
package me.nvus.nvus_prison_setup.Listeners;
import org.bukkit.ChatColor;
import org.bukkit.Color;
import org.bukkit.Material;
import org.bukkit.entity.Player;
@ -61,5 +62,7 @@ public class PlayerSpawn implements Listener {
player.getInventory().setChestplate(leatherChestplatePrison);
player.getInventory().setLeggings(leatherLeggingsPrison);
player.getInventory().setBoots(leatherBootsPrison);
player.sendMessage(ChatColor.translateAlternateColorCodes('&',"&6&lYou're a prisoner! &6You've been given the default prisoner armor!"));
}
}