How would I go about programmatically banning a user from a server? Either GameProfile
or InetAddress
works. Thanks.
- Use
Ban.builder()
to create a ban. Make sure to call eitherprofile()
oraddress()
, depending on your needs. - Call
Sponge.getServiceManager().getUnchecked(BanService.class).addBan(ban);
.
1 Like