Dieser Commit ist enthalten in:
Ursprung
0c6b1b7f68
Commit
d3a49bbeb0
@ -29,7 +29,7 @@ import de.steamwar.command.SWCommand;
|
|||||||
import de.steamwar.command.TypeMapper;
|
import de.steamwar.command.TypeMapper;
|
||||||
import de.steamwar.linkage.Linked;
|
import de.steamwar.linkage.Linked;
|
||||||
import de.steamwar.sql.SteamwarUser;
|
import de.steamwar.sql.SteamwarUser;
|
||||||
import de.steamwar.sql.UserGroup;
|
import de.steamwar.sql.UserPerm;
|
||||||
import net.md_5.bungee.api.chat.ClickEvent;
|
import net.md_5.bungee.api.chat.ClickEvent;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
@ -52,10 +52,9 @@ public class SkinCommand extends SWCommand {
|
|||||||
|
|
||||||
@Register(help = true)
|
@Register(help = true)
|
||||||
public void genericHelp(Player p, String... args) {
|
public void genericHelp(Player p, String... args) {
|
||||||
SteamwarUser steamwarUser = SteamwarUser.get(p.getUniqueId());
|
SteamwarUser user = SteamwarUser.get(p.getUniqueId());
|
||||||
UserGroup userGroup = steamwarUser.getUserGroup();
|
|
||||||
|
|
||||||
if (!userGroup.isAdminGroup()) {
|
if (!user.hasPerm(UserPerm.ADMINISTRATION)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -64,10 +63,9 @@ public class SkinCommand extends SWCommand {
|
|||||||
|
|
||||||
@Register
|
@Register
|
||||||
public void createCommand(Player p, @OptionalValue("") @Mapper("force") String force, @Mapper("kuerzel") String typeKuerzel, @Mapper("creator") String creator, String... names) {
|
public void createCommand(Player p, @OptionalValue("") @Mapper("force") String force, @Mapper("kuerzel") String typeKuerzel, @Mapper("creator") String creator, String... names) {
|
||||||
SteamwarUser steamwarUser = SteamwarUser.get(p.getUniqueId());
|
SteamwarUser user = SteamwarUser.get(p.getUniqueId());
|
||||||
UserGroup userGroup = steamwarUser.getUserGroup();
|
|
||||||
|
|
||||||
if (!userGroup.isAdminGroup()) {
|
if (!user.hasPerm(UserPerm.ADMINISTRATION)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Region region = Region.getRegion(p.getLocation());
|
Region region = Region.getRegion(p.getLocation());
|
||||||
@ -113,10 +111,9 @@ public class SkinCommand extends SWCommand {
|
|||||||
|
|
||||||
@Register("boundary")
|
@Register("boundary")
|
||||||
public void showRegionBoundaries(Player p) {
|
public void showRegionBoundaries(Player p) {
|
||||||
SteamwarUser steamwarUser = SteamwarUser.get(p.getUniqueId());
|
SteamwarUser user = SteamwarUser.get(p.getUniqueId());
|
||||||
UserGroup userGroup = steamwarUser.getUserGroup();
|
|
||||||
|
|
||||||
if (!userGroup.isAdminGroup()) {
|
if (!user.hasPerm(UserPerm.ADMINISTRATION)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (BoundaryViewer.viewers.contains(p)) {
|
if (BoundaryViewer.viewers.contains(p)) {
|
||||||
|
@ -26,6 +26,7 @@ import de.steamwar.command.SWCommand;
|
|||||||
import de.steamwar.command.TypeValidator;
|
import de.steamwar.command.TypeValidator;
|
||||||
import de.steamwar.linkage.Linked;
|
import de.steamwar.linkage.Linked;
|
||||||
import de.steamwar.sql.SteamwarUser;
|
import de.steamwar.sql.SteamwarUser;
|
||||||
|
import de.steamwar.sql.UserPerm;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@ -53,8 +54,8 @@ public class StopCommand extends SWCommand {
|
|||||||
if (Permission.hasPermission(player, Permission.WORLD)) {
|
if (Permission.hasPermission(player, Permission.WORLD)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
SteamwarUser steamwarUser = SteamwarUser.get(player.getUniqueId());
|
SteamwarUser user = SteamwarUser.get(player.getUniqueId());
|
||||||
if (steamwarUser.getUserGroup().isAdminGroup()) {
|
if (user.hasPerm(UserPerm.ADMINISTRATION)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
messageSender.send("STOP_NO_PERMS");
|
messageSender.send("STOP_NO_PERMS");
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren