Convert punishment commands to Kotlin

This commit is contained in:
Cube
2017-06-04 19:56:51 +03:00
parent 6db98406d5
commit 72c0be8ac6
3 changed files with 78 additions and 0 deletions
@@ -28,6 +28,7 @@ import org.apollo.game.model.entity.attr.AttributeDefinition;
import org.apollo.game.model.entity.attr.AttributeMap;
import org.apollo.game.model.entity.attr.AttributePersistence;
import org.apollo.game.model.entity.attr.NumericalAttribute;
import org.apollo.game.model.entity.attr.BooleanAttribute;
import org.apollo.game.model.entity.obj.DynamicGameObject;
import org.apollo.game.model.entity.setting.MembershipStatus;
import org.apollo.game.model.entity.setting.PrivacyState;
@@ -943,6 +944,22 @@ public final class Player extends Mob {
this.withdrawingNotes = withdrawingNotes;
}
/**
* Ban the player.
*/
public void ban() {
attributes.set("banned", new BooleanAttribute(true));
}
/**
* Sets the mute status of a player.
*
* @param muted Whether the player is muted.
*/
public void setMuted(boolean muted) {
attributes.set("muted", new BooleanAttribute(muted));
}
@Override
public void shout(String message, boolean chatOnly) {
blockSet.add(SynchronizationBlock.createForceChatBlock(chatOnly ? message : '~' + message));