change lobby start item to start permission from op
This commit is contained in:
parent
c2bac8abfe
commit
55c215062f
2 changed files with 2 additions and 2 deletions
|
@ -298,7 +298,7 @@ public class EventListener implements Listener {
|
||||||
Game.leave(event.getPlayer());
|
Game.leave(event.getPlayer());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (temp.getItemMeta().getDisplayName().equalsIgnoreCase(lobbyStartItem.getItemMeta().getDisplayName()) && temp.getType() == lobbyStartItem.getType()) {
|
if (temp.getItemMeta().getDisplayName().equalsIgnoreCase(lobbyStartItem.getItemMeta().getDisplayName()) && temp.getType() == lobbyStartItem.getType() && event.getPlayer().hasPermission("hideandseek.start")) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
if (Game.isNotSetup()) {
|
if (Game.isNotSetup()) {
|
||||||
event.getPlayer().sendMessage(errorPrefix + message("GAME_SETUP"));
|
event.getPlayer().sendMessage(errorPrefix + message("GAME_SETUP"));
|
||||||
|
|
|
@ -260,7 +260,7 @@ public class Game {
|
||||||
public static void join(Player player){
|
public static void join(Player player){
|
||||||
if(Game.status == Status.STANDBY) {
|
if(Game.status == Status.STANDBY) {
|
||||||
player.getInventory().clear();
|
player.getInventory().clear();
|
||||||
if(lobbyStartItem != null && (!lobbyItemStartAdmin || player.isOp()))
|
if(lobbyStartItem != null && (!lobbyItemStartAdmin || player.hasPermission("hideandseek.start")))
|
||||||
player.getInventory().setItem(lobbyItemStartPosition, lobbyStartItem);
|
player.getInventory().setItem(lobbyItemStartPosition, lobbyStartItem);
|
||||||
if(lobbyLeaveItem != null)
|
if(lobbyLeaveItem != null)
|
||||||
player.getInventory().setItem(lobbyItemLeavePosition, lobbyLeaveItem);
|
player.getInventory().setItem(lobbyItemLeavePosition, lobbyLeaveItem);
|
||||||
|
|
Loading…
Reference in a new issue