v0.9.6:
- projectile fix - multiple worlds without multiverse fix
This commit is contained in:
parent
7458b09a17
commit
4c7c4bb94d
2 changed files with 7 additions and 3 deletions
|
@ -47,9 +47,13 @@ public class Communicator extends AbstractCommunicator {
|
|||
}
|
||||
public GameMode getDefaultGameMode(World world) {
|
||||
GameMode def = Bukkit.getServer().getDefaultGameMode();
|
||||
if (isPluginEnabled("Multiverse-Core"))
|
||||
if (isMultiVerse())
|
||||
def = MultiVerse.getGameMode(world);
|
||||
Core.debug("com: "+world.getName()+": game mode: "+def);
|
||||
return def;
|
||||
}
|
||||
|
||||
public boolean isMultiVerse() {
|
||||
return isPluginEnabled("Multiverse-Core");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -277,7 +277,7 @@ public class LCPlayer {
|
|||
public void onDamage(Entity from, EntityDamageByEntityEvent event) { // receives damage
|
||||
if (from instanceof Player) {
|
||||
// its PVP
|
||||
Player attacker = (Player) event.getDamager();
|
||||
Player attacker = (Player) from;
|
||||
if (attacker.getGameMode() == GameMode.CREATIVE) {
|
||||
if (!plugin.config.getPermissionsEnabled() || !Players.get(attacker).hasPermission(Perms.NoLimit.PVP)) {
|
||||
event.setCancelled(true);
|
||||
|
@ -423,7 +423,7 @@ public class LCPlayer {
|
|||
// result: change him back to default mode
|
||||
if (checkSwitchFlight(area_event)) {
|
||||
setRegionGameMode(null);
|
||||
if (event == null || event.getTo().getWorld() == event.getFrom().getWorld()) {
|
||||
if (event == null || event.getTo().getWorld() == event.getFrom().getWorld() || !plugin.com.isMultiVerse()) {
|
||||
// do not enforce the game mode change, on world teleport, as multiverse may cancel the event afterwards
|
||||
// the world-change game-mode change is done by multiworld
|
||||
getPlayer().setGameMode(DEFAULT_GAMEMODE);
|
||||
|
|
Loading…
Reference in a new issue