Don't call SpoutStuff if Spout isn't enabled

This commit is contained in:
bm01 2012-07-07 23:48:22 +02:00
parent 8c178869b7
commit dbaab4efe1

View File

@ -6,7 +6,6 @@ import java.io.FileWriter;
import java.io.IOException; import java.io.IOException;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
import org.bukkit.OfflinePlayer;
import org.bukkit.command.Command; import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;
@ -16,7 +15,6 @@ import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.commands.CommandHelper; import com.gmail.nossr50.commands.CommandHelper;
import com.gmail.nossr50.config.Config; import com.gmail.nossr50.config.Config;
import com.gmail.nossr50.datatypes.McMMOPlayer; import com.gmail.nossr50.datatypes.McMMOPlayer;
import com.gmail.nossr50.datatypes.PlayerProfile;
import com.gmail.nossr50.datatypes.SpoutHud; import com.gmail.nossr50.datatypes.SpoutHud;
import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.spout.SpoutStuff; import com.gmail.nossr50.spout.SpoutStuff;
@ -116,9 +114,12 @@ public class McremoveCommand implements CommandExecutor {
if (player.isOnline()) { if (player.isOnline()) {
Users.addUser(player); Users.addUser(player);
if (mcMMO.spoutEnabled) {
SpoutStuff.reloadSpoutPlayer(player); SpoutStuff.reloadSpoutPlayer(player);
} }
} }
}
return true; return true;
} }