1.17.1-rc-1

This commit is contained in:
gnembon committed 2021-07-02 00:28:49 -03:00
1 parent 92eb46e8ad
commit 702789cab5
4 files changed
+6 -6

No files matched your search

@@ -189,7 +189,7 @@ public class PlayerCommand
Messenger.m(context.getSource(), "r Player ", "rb " + playerName, "r is already logged on");
return true;
}
GameProfile profile = server.getUserCache().findByName(playerName);
GameProfile profile = server.getUserCache().findByName(playerName).orElse(null);
if (profile == null)
{
if (!CarpetSettings.allowSpawningOfflinePlayers)
@@ -62,7 +62,7 @@ public class ServerPlayNetworkHandler_scarpetEventsMixin
@Inject(method = "onPlayerAction", at = @At(
value = "INVOKE",
target = "Lnet/minecraft/server/network/ServerPlayerEntity;method_37413(Z)Z", // dropSelectedItem
target = "Lnet/minecraft/server/network/ServerPlayerEntity;dropSelectedItem(Z)Z", // dropSelectedItem
ordinal = 0,
shift = At.Shift.BEFORE
))
@@ -84,7 +84,7 @@ public class ServerPlayNetworkHandler_scarpetEventsMixin
@Inject(method = "onPlayerAction", at = @At(
value = "INVOKE",
target = "Lnet/minecraft/server/network/ServerPlayerEntity;method_37413(Z)Z", // dropSelectedItem
target = "Lnet/minecraft/server/network/ServerPlayerEntity;dropSelectedItem(Z)Z", // dropSelectedItem
ordinal = 1,
shift = At.Shift.BEFORE
))
@@ -40,7 +40,7 @@ public class EntityPlayerMPFake extends ServerPlayerEntity
UserCache.setUseRemote(false);
GameProfile gameprofile;
try {
gameprofile = server.getUserCache().findByName(username);
gameprofile = server.getUserCache().findByName(username).orElse(null);
}
finally {
UserCache.setUseRemote(server.isDedicated() && server.isOnlineMode());