Merge pull request 'added rg color command' (#239) from ColorCustomization into master
Reviewed-on: #239 Reviewed-by: YoyoNow <jwsteam@nidido.de>
Dieser Commit ist enthalten in:
Commit
4f06773ac4
@ -9,8 +9,15 @@ import org.bukkit.entity.Player;
|
||||
|
||||
public class CommandColor extends SWCommand {
|
||||
|
||||
private static CommandColor instance = null;
|
||||
|
||||
public CommandColor() {
|
||||
super("color");
|
||||
instance = this;
|
||||
}
|
||||
|
||||
public static CommandColor getInstance() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
@Register(help = true)
|
||||
@ -43,6 +50,11 @@ public class CommandColor extends SWCommand {
|
||||
p.sendMessage(BauSystem.PREFIX + "Regions farben auf §e" + color.name().toLowerCase() + "§7 gesetzt");
|
||||
}
|
||||
|
||||
@Register
|
||||
public void genericColorSet(Player p, ColorizationType colorizationType, Color color) {
|
||||
genericColorSet(p, color, colorizationType);
|
||||
}
|
||||
|
||||
private boolean permissionCheck(Player p) {
|
||||
if (!BauSystem.getOwner().equals(p.getUniqueId())) {
|
||||
p.sendMessage(BauSystem.PREFIX + "§cDies ist nicht deine Welt!");
|
||||
|
@ -2,6 +2,7 @@ package de.steamwar.bausystem.commands;
|
||||
|
||||
import de.steamwar.bausystem.BauSystem;
|
||||
import de.steamwar.bausystem.Permission;
|
||||
import de.steamwar.bausystem.world.Color;
|
||||
import de.steamwar.bausystem.world.Region;
|
||||
import de.steamwar.bausystem.world.Welt;
|
||||
import de.steamwar.command.SWCommand;
|
||||
@ -92,6 +93,11 @@ public class CommandRegion extends SWCommand {
|
||||
}
|
||||
}
|
||||
|
||||
@Register("color")
|
||||
public void colorCommand(Player p, Color color) {
|
||||
CommandColor.getInstance().genericColor(p, color);
|
||||
}
|
||||
|
||||
static boolean checkGlobalRegion(Region region, Player p) {
|
||||
if(Region.GlobalRegion.isGlobalRegion(region)) {
|
||||
p.sendMessage(BauSystem.PREFIX + "§cDu bist in keiner Region");
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren