Added some bypass permissions

This commit is contained in:
Sn0wStorm
2013-11-21 23:06:43 +01:00
parent 9d5b90254a
commit 71a8a66d64
3 changed files with 22 additions and 6 deletions
+6 -4
View File
@@ -115,7 +115,7 @@ public class BPlayer {
// Player has drunken too much
public void drinkCap(Player player) {
if (overdrinkKick) {
if (overdrinkKick && !player.hasPermission("brewery.bypass.overdrink")) {
passOut(player);
} else {
quality = getQuality() * 100;
@@ -263,7 +263,7 @@ public class BPlayer {
public void login(final Player player) {
if (drunkeness < 10) {
if (offlineDrunk > 60) {
if (enableHome) {
if (enableHome && !player.hasPermission("brewery.bypass.teleport")) {
goHome(player);
}
}
@@ -274,8 +274,10 @@ public class BPlayer {
} else if (offlineDrunk - drunkeness >= 30) {
Location randomLoc = Wakeup.getRandom(player.getLocation());
if (randomLoc != null) {
player.teleport(randomLoc);
P.p.msg(player, P.p.languageReader.get("Player_Wake"));
if (!player.hasPermission("brewery.bypass.teleport")) {
player.teleport(randomLoc);
P.p.msg(player, P.p.languageReader.get("Player_Wake"));
}
}
}