Skip to content

Commit

Permalink
hotfixed spawn <playername> can be executed by everyone
Browse files Browse the repository at this point in the history
  • Loading branch information
0PandaDEV committed Apr 28, 2024
1 parent 29c3b8a commit 36ff82e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,4 @@ server
.gitignore
.github/
/move.sh
.stignore
5 changes: 5 additions & 0 deletions src/main/java/net/pandadev/nextron/commands/SpawnCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ protected void execute(CommandSender sender, String label, String[] args) {
player.sendMessage(Main.getPrefix() + Text.get("spawn.teleport"));

} else if (args.length == 1) {
if (!player.hasPermission("nextron.spawn.other")){
player.sendMessage(Main.getNoPerm());
return;
}

if (Main.getInstance().getConfig().get("spawn") == null) {
player.sendMessage(Main.getPrefix() + Text.get("setspawn.error"));
return;
Expand Down

0 comments on commit 36ff82e

Please sign in to comment.