This commit is contained in:
KHobbits 2013-10-05 02:41:08 +01:00
parent 4951c204d2
commit e1ff3542ae
8 changed files with 34 additions and 37 deletions

View File

@ -35,11 +35,6 @@ public class Commandext extends EssentialsLoopCommand
return;
}
if (args[0].trim().length() < 2)
{
throw new PlayerNotFoundException();
}
loopOnlinePlayers(server, user.getBase(), true, args[0], null);
}

View File

@ -56,7 +56,7 @@ public class Commandmsg extends EssentialsLoopCommand
return;
}
loopOnlinePlayers(server, sender, true, args[0], new String[]{message});
loopOnlinePlayers(server, sender, false, args[0], new String[]{message});
}
@Override

View File

@ -26,7 +26,7 @@ public class Commandpay extends EssentialsLoopCommand
}
amount = new BigDecimal(args[1].replaceAll("[^0-9\\.]", ""));
loopOnlinePlayers(server, user.getBase(), true, args[0], args);
loopOnlinePlayers(server, user.getBase(), false, args[0], args);
}
@Override

View File

@ -9,5 +9,4 @@ public class IgnoreStatusChangeEvent extends StatusChangeEvent
{
super(affected, controller, value);
}
}

View File

@ -5,10 +5,8 @@ import net.ess3.api.IUser;
public class MuteStatusChangeEvent extends StatusChangeEvent
{
public MuteStatusChangeEvent(IUser affected, IUser controller, boolean value)
{
super(affected, controller, value);
}
}

View File

@ -3,23 +3,25 @@ package net.ess3.api.events;
import net.ess3.api.IUser;
import org.bukkit.event.Cancellable;
public class NickChangeEvent extends StateChangeEvent implements Cancellable
{
private String newValue;
public NickChangeEvent(IUser affected, IUser controller, String value) {
public NickChangeEvent(IUser affected, IUser controller, String value)
{
super(affected, controller);
this.newValue = value;
}
public NickChangeEvent(boolean isAsync, IUser affected, IUser controller, String value) {
this.newValue = value;
}
public NickChangeEvent(boolean isAsync, IUser affected, IUser controller, String value)
{
super(isAsync, affected, controller);
this.newValue = value;
}
this.newValue = value;
}
public String getValue()
{
return newValue;
}
}

View File

@ -16,18 +16,20 @@ public class StateChangeEvent extends Event implements Cancellable
private boolean cancelled = false;
IUser affected;
IUser controller;
public StateChangeEvent(IUser affected, IUser controller) {
public StateChangeEvent(IUser affected, IUser controller)
{
super();
this.affected = affected;
this.controller = controller;
}
public StateChangeEvent(boolean isAsync, IUser affected, IUser controller) {
}
public StateChangeEvent(boolean isAsync, IUser affected, IUser controller)
{
super(isAsync);
this.affected = affected;
this.controller = controller;
}
}
public IUser getAffected()
{
@ -61,5 +63,4 @@ public class StateChangeEvent extends Event implements Cancellable
{
this.cancelled = cancelled;
}
}

View File

@ -3,6 +3,7 @@ package net.ess3.api.events;
import net.ess3.api.IUser;
import org.bukkit.event.Cancellable;
/**
* This handles common boilerplate for other StatusChangeEvents
*
@ -10,20 +11,21 @@ import org.bukkit.event.Cancellable;
public class StatusChangeEvent extends StateChangeEvent implements Cancellable
{
private boolean newValue;
public StatusChangeEvent(IUser affected, IUser controller, boolean value) {
public StatusChangeEvent(IUser affected, IUser controller, boolean value)
{
super(affected, controller);
this.newValue = value;
}
public StatusChangeEvent(boolean isAsync, IUser affected, IUser controller, boolean value) {
this.newValue = value;
}
public StatusChangeEvent(boolean isAsync, IUser affected, IUser controller, boolean value)
{
super(isAsync, affected, controller);
this.newValue = value;
}
this.newValue = value;
}
public boolean getValue()
{
return newValue;
}
}