Skip to content

Commit

Permalink
Fix compatibility with new CH/AP config
Browse files Browse the repository at this point in the history
  • Loading branch information
fernferret committed Feb 2, 2012
1 parent a80bbdf commit 6c3f83f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Expand Up @@ -12,7 +12,7 @@
import com.onarandombox.MultiverseNetherPortals.listeners.MVNPEntityListener;
import com.onarandombox.MultiverseNetherPortals.listeners.MVNPPlayerListener;
import com.onarandombox.MultiverseNetherPortals.listeners.MVNPPluginListener;
import com.pneumaticraft.commandhandler.CommandHandler;
import com.pneumaticraft.commandhandler.multiverse.CommandHandler;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.configuration.InvalidConfigurationException;
Expand Down Expand Up @@ -140,7 +140,7 @@ private void registerCommands() {
this.commandHandler.registerCommand(new LinkCommand(this));
this.commandHandler.registerCommand(new UnlinkCommand(this));
this.commandHandler.registerCommand(new ShowLinkCommand(this));
for (com.pneumaticraft.commandhandler.Command c : this.commandHandler.getAllCommands()) {
for (com.pneumaticraft.commandhandler.multiverse.Command c : this.commandHandler.getAllCommands()) {
if (c instanceof HelpCommand) {
c.addKey("mvnp");
}
Expand Down Expand Up @@ -266,11 +266,11 @@ public MultiverseCore getCore() {

@Override
public void log(Level level, String msg) {
if (level == Level.FINE && MultiverseCore.GlobalDebug >= 1) {
if (level == Level.FINE && MultiverseCore.getStaticConfig().getGlobalDebug() >= 1) {
staticDebugLog(Level.INFO, msg);
} else if (level == Level.FINER && MultiverseCore.GlobalDebug >= 2) {
} else if (level == Level.FINER && MultiverseCore.getStaticConfig().getGlobalDebug() >= 2) {
staticDebugLog(Level.INFO, msg);
} else if (level == Level.FINEST && MultiverseCore.GlobalDebug >= 3) {
} else if (level == Level.FINEST && MultiverseCore.getStaticConfig().getGlobalDebug() >= 3) {
staticDebugLog(Level.INFO, msg);
} else if (level != Level.FINE && level != Level.FINER && level != Level.FINEST) {
staticLog(level, msg);
Expand Down
@@ -1,7 +1,7 @@
package com.onarandombox.MultiverseNetherPortals.commands;

import com.onarandombox.MultiverseNetherPortals.MultiverseNetherPortals;
import com.pneumaticraft.commandhandler.Command;
import com.pneumaticraft.commandhandler.multiverse.Command;
import org.bukkit.command.CommandSender;

import java.util.List;
Expand Down
Expand Up @@ -157,7 +157,7 @@ public void onEntityPortalEnter(EntityPortalEnterEvent event) {
"' because they don't have the FUNDS required to enter.");
return;
}
if (MultiverseCore.EnforceAccess) {
if (MultiverseCore.getStaticConfig().getEnforceAccess()) {
if (!pt.playerCanGoFromTo(fromWorld, toWorld, p, p)) {
this.shootPlayer(p, eventLocation.getBlock(), type);
this.plugin.log(Level.FINE, "Player '" + p.getName() + "' was DENIED ACCESS to '" + toWorld.getCBWorld().getName() +
Expand Down
Expand Up @@ -74,7 +74,7 @@ public void onPlayerPortal(PlayerPortalEvent event) {
"' because they don't have the FUNDS required to enter.");
return;
}
if (MultiverseCore.EnforceAccess) {
if (MultiverseCore.getStaticConfig().getEnforceAccess()) {
event.setCancelled(!pt.playerCanGoFromTo(fromWorld, toWorld, event.getPlayer(), event.getPlayer()));
if (event.isCancelled()) {
this.plugin.log(Level.FINE, "Player '" + event.getPlayer().getName() + "' was DENIED ACCESS to '" + event.getTo().getWorld().getName() +
Expand Down

0 comments on commit 6c3f83f

Please sign in to comment.