Skip to content

Commit 89eef41

Browse files
author
FungY911
committed
permissions fix
1 parent 38f6e72 commit 89eef41

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

src/main/java/tk/fungy/wsformc/Command.java

+15
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ public boolean onCommand(CommandSender sender, org.bukkit.command.Command comman
4646
"/wsm \n");
4747
return true;
4848
case "start":
49+
if (sender.hasPermission("ws.start")) {
50+
sender.sendMessage(Colors.translate(new FileManager().getStringFromConfig("No-Permission")));
51+
return true;
52+
}
53+
4954
if (ws != null) {
5055
sender.sendMessage("WebServer is alredy started!");
5156
return true;
@@ -71,6 +76,11 @@ public boolean onCommand(CommandSender sender, org.bukkit.command.Command comman
7176
player.spigot().sendMessage(message);
7277
return true;
7378
case "stop":
79+
if (sender.hasPermission("ws.stop")) {
80+
sender.sendMessage(Colors.translate(new FileManager().getStringFromConfig("No-Permission")));
81+
return true;
82+
}
83+
7484
if (ws == null) {
7585
sender.sendMessage("WebServer was not started yet!");
7686
return true;
@@ -85,6 +95,11 @@ public boolean onCommand(CommandSender sender, org.bukkit.command.Command comman
8595
ws = null;
8696
return true;
8797
case "reload":
98+
if (sender.hasPermission("ws.reload")) {
99+
sender.sendMessage(Colors.translate(new FileManager().getStringFromConfig("No-Permission")));
100+
return true;
101+
}
102+
88103
switch (args[1]) {
89104
case "config":
90105
sender.sendMessage("Reloading config...");

src/main/resources/config.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# #
77
# By using this plugin, you automatically accept Minecraft EULA! #
88
# If you have any problem, you can ask on our Discord for Support in #
9-
# channel #📃┃help or by forum channel called #📈┃support. If you #
9+
# channel #📃┃help or by forum channel called #📈┃support. If you #
1010
# found any bug, please report it. It'll help you and for our plugin! #
1111
# #
1212
########################################################################
@@ -19,7 +19,7 @@
1919
# All Perms - ws.* #
2020
# Webserver Start - ws.start #
2121
# Webserver Stop - ws.stop #
22-
# Webserver Restart - ws.restart #
22+
# Plugin Reload - ws.reload #
2323
# Set new port - ws.port #
2424
# Tab - ws.tab #
2525
# #

0 commit comments

Comments
 (0)