mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-09-06 04:08:03 +02:00
Fixed auto-god mode and auto-amphibious mode.
This commit is contained in:
parent
1b843b3586
commit
cc6ac93b7a
@ -224,6 +224,11 @@ public void onEntityDamage(EntityDamageEvent event) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (type == DamageCause.DROWNING && cfg.hasAmphibiousMode(player)) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (wcfg.disableFallDamage && type == DamageCause.FALL) {
|
||||
event.setCancelled(true);
|
||||
|
@ -295,7 +295,15 @@ public void onPlayerJoin(PlayerJoinEvent event) {
|
||||
|
||||
if (wcfg.fireSpreadDisableToggle) {
|
||||
player.sendMessage(ChatColor.YELLOW
|
||||
+ "Fire spread is currently globally disabled.");
|
||||
+ "Fire spread is currently globally disabled for this world.");
|
||||
}
|
||||
|
||||
if (plugin.inGroup(player, "wg-invincible")) {
|
||||
cfg.enableGodMode(player);
|
||||
}
|
||||
|
||||
if (plugin.inGroup(player, "wg-amphibious")) {
|
||||
cfg.enableAmphibiousMode(player);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user