mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-07-05 23:24:44 +02:00
Cleanup & refactoring, part 1.
This commit is contained in:
@ -1,20 +1,25 @@
|
||||
package com.gmail.nossr50.commands.general;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.m;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.commands.CommandHelper;
|
||||
import com.gmail.nossr50.config.LoadProperties;
|
||||
import com.gmail.nossr50.locale.mcLocale;
|
||||
|
||||
public class XprateCommand implements CommandExecutor {
|
||||
private final mcMMO plugin;
|
||||
private static int oldrate = LoadProperties.xpGainMultiplier;
|
||||
public static boolean xpevent = false;
|
||||
|
||||
public XprateCommand (mcMMO plugin) {
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
String usage1 = mcLocale.getString("Commands.xprate.proper");
|
||||
@ -29,7 +34,7 @@ public class XprateCommand implements CommandExecutor {
|
||||
case 1:
|
||||
if (args[0].equalsIgnoreCase("reset")) {
|
||||
if (xpevent) {
|
||||
for (Player x : Bukkit.getServer().getOnlinePlayers()) {
|
||||
for (Player x : plugin.getServer().getOnlinePlayers()) {
|
||||
x.sendMessage(mcLocale.getString("Commands.xprate.over"));
|
||||
}
|
||||
|
||||
@ -63,7 +68,7 @@ public class XprateCommand implements CommandExecutor {
|
||||
LoadProperties.xpGainMultiplier = m.getInt(args[0]);
|
||||
|
||||
if (xpevent) {
|
||||
for (Player x : Bukkit.getServer().getOnlinePlayers()) {
|
||||
for (Player x : plugin.getServer().getOnlinePlayers()) {
|
||||
x.sendMessage(mcLocale.getString("Commands.xprate.started"));
|
||||
x.sendMessage(mcLocale.getString("Commands.xprate.started2", new Object[] {LoadProperties.xpGainMultiplier}));
|
||||
}
|
||||
|
Reference in New Issue
Block a user