mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-06 08:40:03 +00:00
Convert punishment commands to Kotlin
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user