mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
Cleanup
This commit is contained in:
parent
972e81276d
commit
d066c1b754
@ -102,7 +102,9 @@ public class TFM_PlayerListener implements Listener
|
||||
}
|
||||
case BLAZE_ROD:
|
||||
{
|
||||
if (TotalFreedomMod.allowExplosions && TFM_SuperadminList.isSeniorAdmin(player))
|
||||
if (TotalFreedomMod.allowExplosions)
|
||||
{
|
||||
if (TFM_SuperadminList.isSeniorAdmin(player, true))
|
||||
{
|
||||
Block target_block;
|
||||
|
||||
@ -128,11 +130,14 @@ public class TFM_PlayerListener implements Listener
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case CARROT:
|
||||
{
|
||||
if (TotalFreedomMod.allowExplosions && TFM_SuperadminList.isSeniorAdmin(player))
|
||||
if (TotalFreedomMod.allowExplosions)
|
||||
{
|
||||
if (TFM_SuperadminList.isSeniorAdmin(player, true))
|
||||
{
|
||||
Location player_location = player.getLocation().clone();
|
||||
|
||||
@ -186,6 +191,7 @@ public class TFM_PlayerListener implements Listener
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -291,6 +297,7 @@ public class TFM_PlayerListener implements Listener
|
||||
p.setVelocity(new Vector(0, playerdata.orbitStrength(), 0));
|
||||
}
|
||||
}
|
||||
|
||||
if (TotalFreedomMod.landminesEnabled && TotalFreedomMod.allowExplosions)
|
||||
{
|
||||
Iterator<TFM_LandmineData> landmines = TFM_LandmineData.landmines.iterator();
|
||||
|
@ -202,6 +202,19 @@ public class TFM_SuperadminList
|
||||
|
||||
public static boolean isSeniorAdmin(CommandSender user)
|
||||
{
|
||||
return isSeniorAdmin(user, false);
|
||||
}
|
||||
|
||||
public static boolean isSeniorAdmin(CommandSender user, boolean verify_is_superadmin)
|
||||
{
|
||||
if (verify_is_superadmin)
|
||||
{
|
||||
if (!isUserSuperadmin(user))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
String user_name = user.getName().toLowerCase();
|
||||
|
||||
if (!(user instanceof Player))
|
||||
|
Loading…
Reference in New Issue
Block a user