some changes

This commit is contained in:
ScriptCat 2025-07-26 14:49:34 +03:00
parent 1539130afe
commit 557588d535
2 changed files with 2 additions and 18 deletions

View File

@ -10,13 +10,6 @@ import tokarotik.giftapi.NBT.cache.BasicNBT;
public class WorldNBTSynchronizer public class WorldNBTSynchronizer
{ {
public static void getWorld(EntityPlayer entityPlayer, String worldName)
{
if (hasAll(entityPlayer, worldName)) { return; }
}
public static boolean isPlayerEmpty(EntityPlayer entityPlayer) public static boolean isPlayerEmpty(EntityPlayer entityPlayer)
{ {
return getWorldWhatHasPlayer(entityPlayer) == null; return getWorldWhatHasPlayer(entityPlayer) == null;
@ -43,8 +36,7 @@ public class WorldNBTSynchronizer
boolean isHasPlayer = hasPlayer(entityPlayer.getName(), worldName); boolean isHasPlayer = hasPlayer(entityPlayer.getName(), worldName);
if (!isHasPlayer) { return false; } if (!isHasPlayer) { return false; }
boolean isHasNBT = hasGiftApiNBT(entityPlayer, worldName); return hasGiftApiNBT(entityPlayer, worldName);
return isHasNBT;
} }
private static boolean hasPlayer(String playerName, String worldName) private static boolean hasPlayer(String playerName, String worldName)
@ -53,7 +45,7 @@ public class WorldNBTSynchronizer
for (Player player : world.getPlayers()) for (Player player : world.getPlayers())
{ {
if (player.getName() == playerName) { return true; } if (player.getName().equals(playerName)) { return true; }
} }
return false; return false;

View File

@ -25,14 +25,6 @@ public class GiftCommand implements CommandExecutor {
return true; return true;
} }
new NBTManager("world").write((Player) sender);
//BasicNBT nbt = new BasicNBT("world");
//System.out.println(nbt.readPlayerNBT(nbt.getPlayer((Player) sender)).getCompound("giftapi"));
//((Player) sender).getInventory().addItem(new ItemLoad(nbt.readPlayerNBT(nbt.getPlayer((Player) sender)).getCompound("giftapi")).getItem());
this.apiManager.openInventory((Player) sender); this.apiManager.openInventory((Player) sender);
return true; return true;