mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-02 17:09:35 +01:00
Fixed auto-god mode and auto-amphibious mode.
This commit is contained in:
parent
1b843b3586
commit
cc6ac93b7a
@ -225,6 +225,11 @@ public void onEntityDamage(EntityDamageEvent event) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (type == DamageCause.DROWNING && cfg.hasAmphibiousMode(player)) {
|
||||||
|
event.setCancelled(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (wcfg.disableFallDamage && type == DamageCause.FALL) {
|
if (wcfg.disableFallDamage && type == DamageCause.FALL) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
|
@ -295,7 +295,15 @@ public void onPlayerJoin(PlayerJoinEvent event) {
|
|||||||
|
|
||||||
if (wcfg.fireSpreadDisableToggle) {
|
if (wcfg.fireSpreadDisableToggle) {
|
||||||
player.sendMessage(ChatColor.YELLOW
|
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