Fixed class cast exception when running warn from console
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
package com.redstoner.modules.warn;
|
package com.redstoner.modules.warn;
|
||||||
|
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
|
|
||||||
import com.nemez.cmdmgr.Command;
|
import com.nemez.cmdmgr.Command;
|
||||||
import com.redstoner.annotations.Commands;
|
import com.redstoner.annotations.Commands;
|
||||||
@@ -11,20 +10,20 @@ import com.redstoner.misc.Utils;
|
|||||||
import com.redstoner.modules.Module;
|
import com.redstoner.modules.Module;
|
||||||
|
|
||||||
@Commands(CommandHolderType.String)
|
@Commands(CommandHolderType.String)
|
||||||
@Version(major = 4, minor = 0, revision = 0, compatible = 4)
|
@Version(major = 4, minor = 0, revision = 1, compatible = 4)
|
||||||
public class Warn implements Module
|
public class Warn implements Module
|
||||||
{
|
{
|
||||||
@Command(hook = "warn")
|
@Command(hook = "warn")
|
||||||
public void warn_normal(CommandSender sender)
|
public void warn_normal(CommandSender sender)
|
||||||
{
|
{
|
||||||
String name = ((Player) sender).getDisplayName();
|
String name = Utils.getName(sender);
|
||||||
Utils.broadcast(null, "§2Lag incoming! - §9" + name, null);
|
Utils.broadcast(null, "§2Lag incoming! - §9" + name, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Command(hook = "warnp")
|
@Command(hook = "warnp")
|
||||||
public void warn_possible(CommandSender sender)
|
public void warn_possible(CommandSender sender)
|
||||||
{
|
{
|
||||||
String name = ((Player) sender).getDisplayName();
|
String name = Utils.getName(sender);
|
||||||
Utils.broadcast(null, "§2Possible lag incoming! - §9" + name, null);
|
Utils.broadcast(null, "§2Possible lag incoming! - §9" + name, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user