[PORT] 25w35a
This commit is contained in:
@@ -12,6 +12,7 @@ import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
@Mixin(StoredUserList.class)
|
||||
@@ -20,7 +21,7 @@ public abstract class WhitelistMixin<K, V extends StoredUserEntry<K>> {
|
||||
@Shadow protected abstract boolean contains(K k0);
|
||||
|
||||
@Inject(method = "add", at = @At("HEAD"))
|
||||
private void injectAddEvent(V arg, CallbackInfo ci) {
|
||||
private void injectAddEvent(V arg, CallbackInfoReturnable<Boolean> cir) {
|
||||
try {
|
||||
if (arg instanceof UserWhiteListEntry entry) {
|
||||
StoredUserEntryAccessor entryAccessor = (StoredUserEntryAccessor) entry;
|
||||
@@ -31,8 +32,8 @@ public abstract class WhitelistMixin<K, V extends StoredUserEntry<K>> {
|
||||
} catch (Exception ignored) {}
|
||||
}
|
||||
|
||||
@Inject(method = "remove(Lnet/minecraft/server/players/StoredUserEntry;)V", at = @At("HEAD"))
|
||||
private void injectRemoveEvent(V arg, CallbackInfo ci) {
|
||||
@Inject(method = "remove(Lnet/minecraft/server/players/StoredUserEntry;)Z", at = @At("HEAD"))
|
||||
private void injectRemoveEvent(StoredUserEntry<K> arg, CallbackInfoReturnable<Boolean> cir) {
|
||||
try {
|
||||
if (arg instanceof UserWhiteListEntry entry) {
|
||||
StoredUserEntryAccessor entryAccessor = (StoredUserEntryAccessor) entry;
|
||||
|
@@ -20,11 +20,11 @@ public class BridgedGameProfile {
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return internal.getName();
|
||||
return internal.name();
|
||||
}
|
||||
|
||||
public UUID getId() {
|
||||
return internal.getId();
|
||||
return internal.id();
|
||||
}
|
||||
|
||||
public GameProfile toMojang() {
|
||||
|
Reference in New Issue
Block a user