some changes
This commit is contained in:
parent
557588d535
commit
aceee4a8bc
@ -1,37 +0,0 @@
|
|||||||
package tokarotik.giftapi.NBT;
|
|
||||||
|
|
||||||
import net.minecraft.server.v1_6_R3.EntityPlayer;
|
|
||||||
import net.minecraft.server.v1_6_R3.NBTTagCompound;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
import tokarotik.giftapi.NBT.cache.BasicNBT;
|
|
||||||
|
|
||||||
public class NBTManager
|
|
||||||
{
|
|
||||||
private final BasicNBT basicNBT;
|
|
||||||
|
|
||||||
public NBTManager(String world)
|
|
||||||
{
|
|
||||||
this.basicNBT = new BasicNBT(world);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public boolean write(Player player)
|
|
||||||
{
|
|
||||||
EntityPlayer entityPlayer = this.basicNBT.getPlayer(player);
|
|
||||||
NBTTagCompound tag = this.basicNBT.readPlayerNBT(entityPlayer);
|
|
||||||
|
|
||||||
// some action
|
|
||||||
|
|
||||||
return this.basicNBT.writePlayerNBT(tag, entityPlayer);
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean read(Player player)
|
|
||||||
{
|
|
||||||
EntityPlayer entityPlayer = this.basicNBT.getPlayer(player);
|
|
||||||
NBTTagCompound tag = this.basicNBT.readPlayerNBT(entityPlayer);
|
|
||||||
|
|
||||||
//some action
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
@ -6,7 +6,6 @@ import org.bukkit.Bukkit;
|
|||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import tokarotik.giftapi.NBT.cache.BasicNBT;
|
|
||||||
|
|
||||||
public class WorldNBTSynchronizer
|
public class WorldNBTSynchronizer
|
||||||
{
|
{
|
||||||
|
@ -6,7 +6,6 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import tokarotik.giftapi.APIManager;
|
import tokarotik.giftapi.APIManager;
|
||||||
import tokarotik.giftapi.NBT.NBTManager;
|
|
||||||
|
|
||||||
public class GiftCommand implements CommandExecutor {
|
public class GiftCommand implements CommandExecutor {
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user