mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-30 04:19:30 +00:00
feat: fix some error
This commit is contained in:
@@ -154,7 +154,7 @@ public class BotList {
|
||||
this.botsByName.put(bot.getScoreboardName().toLowerCase(Locale.ROOT), bot);
|
||||
this.botsByUUID.put(bot.getUUID(), bot);
|
||||
|
||||
bot.supressTrackerForLogin = true;
|
||||
bot.suppressTrackerForLogin = true;
|
||||
world.addNewPlayer(bot);
|
||||
optional.ifPresent(nbt -> {
|
||||
bot.loadAndSpawnEnderPearls(nbt);
|
||||
@@ -170,7 +170,7 @@ public class BotList {
|
||||
}
|
||||
|
||||
bot.renderInfo();
|
||||
bot.supressTrackerForLogin = false;
|
||||
bot.suppressTrackerForLogin = false;
|
||||
|
||||
bot.level().getChunkSource().chunkMap.addEntity(bot);
|
||||
bot.renderData();
|
||||
@@ -345,7 +345,7 @@ public class BotList {
|
||||
|
||||
public void setSkin(String[] skin) {
|
||||
if (skin != null) {
|
||||
this.getProperties().put("textures", new Property("textures", skin[0], skin[1]));
|
||||
this.properties().put("textures", new Property("textures", skin[0], skin[1]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ public class ServerMountAction extends ServerBotAction<ServerMountAction> {
|
||||
)).toList();
|
||||
|
||||
for (Vehicle vehicle : vehicles) {
|
||||
if (bot.startRiding(((CraftEntity) vehicle).getHandle(), false)) {
|
||||
if (bot.startRiding(((CraftEntity) vehicle).getHandle(), false, true)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,12 +142,12 @@ public class PcaSyncProtocol implements LeavesProtocol {
|
||||
}
|
||||
}
|
||||
case OPS -> {
|
||||
if (!(entity instanceof ServerBot) && !server.getPlayerList().isOp(player.gameProfile)) {
|
||||
if (!(entity instanceof ServerBot) && !server.getPlayerList().isOp(player.nameAndId())) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
case OPS_AND_SELF -> {
|
||||
if (!(entity instanceof ServerBot) && !server.getPlayerList().isOp(player.gameProfile) && entity != player) {
|
||||
if (!(entity instanceof ServerBot) && !server.getPlayerList().isOp(player.nameAndId()) && entity != player) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -193,7 +193,7 @@ public class REIServerProtocol implements LeavesProtocol {
|
||||
}
|
||||
} else if (channel.equals("ci_msg")) {
|
||||
// cheat rei-client into using "delete_item" packet
|
||||
if (MinecraftServer.getServer().getProfilePermissions(player.getGameProfile()) < 1) {
|
||||
if (MinecraftServer.getServer().getProfilePermissions(player.nameAndId()) < 1) {
|
||||
player.getBukkitEntity().sendOpLevel((byte) 1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user