10 juil. 2017, 15:53

Bonjour, je reviens avec un nouveau problème que je ne comprend pas trop.

Donc je vais d’abord expliquer la démarche que je faite et je vous met ensuite le code commenté par mes soins en anglais du coup plus facile à comprendre car il y a beaucoup de choses xD

Du coup mon joueur A en posant un block seller va pouvoir mettre dans un slot ce qu’il veut vendre et la quantité qu’il veut partant de 1 à 64, le slot ne peut donc pas être de l’air, il a le choix entre plusieurs prix de ventes (5,10,20,50,100,200,500), une fois qu’il a tout mis (blocks,le prix de vente) il clique sur valider et HOP la machine est crée. Les données tels que le propriétaire,l’item,le nombre, le prix, l’argent récolté sont stocké dans le tile entity grâce aux NBT du côté client et serveur. Une fois crée la personne B qui viens acheter peut acheter grâce à sa carte de crédit, si sa carte est bien la sienne, qu’il a l’upgrade permettant d’acheter en sans-fil, si il a plus de fonds que le coût de l’item alors en appuyant sur BUY il reçoit l’item et sa carte diminue du coût dans la machine. Du côté du tile entity un calcul de ouf s’opère x) Donc côté client et server : dans le slot on retire 1 à chaque fois que la personne appuie sur buy et reçoit un item et l’amount diminue lui également de 1 jusqu’à arriver à 0. Une fois à 0, aucune personne ne peut plus acheter. Tout ça fonctionne NIQUEL. Sauf que quand je me déconnecte et reconnecte, bah server et client sont pas synchro, je me remtrouve avec plus rien comme données alors qu’elles sont stocké grâce à l’envoi des packets. Voici mes codes :

Mon block et la fonction on block activated qui prouve que les données sont enregistrée car même en déconnectant reconnectant j’arrive bien au bon Gui :

@Override
public boolean onBlockActivated(World worldIn, BlockPos pos,IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) 
{
 TileEntityBlockSeller te = (TileEntityBlockSeller)worldIn.getTileEntity(pos);
if(te != null && te.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, EnumFacing.NORTH))
{
if(te.getOwner() != null)
{
String checkONBT = te.getOwner();
String checkOBA = playerIn.getUniqueID().toString();

if(checkONBT.equals(checkOBA))
{
if(te.getCreated() == false)
{
playerIn.openGui(ModEconomy.instance, GuiHandler.BLOCK_SELLER, worldIn, pos.getX(), pos.getY(), pos.getZ());
}
else
{
playerIn.openGui(ModEconomy.instance, GuiHandler.BLOCK_SELLER_BUY, worldIn, pos.getX(), pos.getY(), pos.getZ());
}
}
else
{
playerIn.openGui(ModEconomy.instance, GuiHandler.BLOCK_SELLER_BUY, worldIn, pos.getX(), pos.getY(), pos.getZ());
}
}
else
{
System.out.println(te.getOwner());
}
}
        return true;
    }

Le GUI de la personne qui met en vente (une fois validée il n’y a plus accès pour éviter la triche, càd reprendre les items dans le slot. C’est fait par une variable stockée dans le tile entity) :

package fr.fifou.economy.gui;

import java.awt.Color;
import java.io.IOException;

import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiTextField;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.text.TextComponentString;
import net.minecraft.util.text.TextComponentTranslation;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.world.World;
import net.minecraftforge.fml.client.config.GuiButtonExt;

import org.lwjgl.opengl.GL11;

import fr.fifou.economy.ModEconomy;
import fr.fifou.economy.blocks.tileentity.TileEntityBlockSeller;
import fr.fifou.economy.blocks.tileentity.TileEntityBlockVault;
import fr.fifou.economy.containers.ContainerSeller;
import fr.fifou.economy.packets.PacketCardChange;
import fr.fifou.economy.packets.PacketSellerCreated;

public class GuiSeller extends GuiContainer
{
private TileEntityBlockSeller tile;

public GuiSeller(InventoryPlayer playerInventory, TileEntityBlockSeller tile) 
{
super(new ContainerSeller(playerInventory, tile));
this.tile = tile;

}

private static final ResourceLocation background = new ResourceLocation(ModEconomy.MODID ,"textures/gui/screen/gui_seller.png");
protected int xSize = 176;
protected int ySize = 168;
protected int guiLeft;
protected int guiTop;

private GuiButtonExt validate;
private GuiButtonExt five;
private GuiButtonExt ten;
private GuiButtonExt twenty;
private GuiButtonExt fifty;
private GuiButtonExt hundreed;
private GuiButtonExt twoHundreed;
private GuiButtonExt fiveHundreed;

private static int cost;

@Override
public void updateScreen() 
{
super.updateScreen();
}

@Override
public void initGui() 
{
super.initGui();
if(tile.getCreated() == false)
{
this.buttonList.add(this.validate = new GuiButtonExt(1, width / 2 + 46, height / 2 - 33, 35, 20, "Validate"));
this.buttonList.add(this.five = new GuiButtonExt(2, width / 2 - 122, height / 2 - 66, 35, 20, "5"));
this.buttonList.add(this.ten = new GuiButtonExt(3, width / 2- 122, height / 2 -47, 35, 20, "10"));
this.buttonList.add(this.twenty = new GuiButtonExt(4, width / 2 - 122, height / 2 - 28, 35, 20, "20"));
this.buttonList.add(this.fifty = new GuiButtonExt(5, width / 2 - 122, height / 2 -9, 35, 20, "50"));
this.buttonList.add(this.hundreed = new GuiButtonExt(6, width / 2 - 122, height / 2 + 10, 35, 20, "100"));
this.buttonList.add(this.twoHundreed = new GuiButtonExt(7, width / 2 - 122, height / 2 +29, 35, 20, "200"));
this.buttonList.add(this.fiveHundreed = new GuiButtonExt(8, width / 2 - 122, height / 2 + 48, 35, 20, "500"));
}
}

@Override
protected void actionPerformed(GuiButton button) throws IOException 
{
super.actionPerformed(button);

World worldIn = mc.world;
EntityPlayer playerIn = mc.player;
if(tile != null)
{
if(button == this.five)
{
tile.setCost(5);
this.cost = 5;
}
else if(button == this.ten)
{
tile.setCost(10);
this.cost = 10;
}
else if(button == this.twenty)
{
tile.setCost(20);
this.cost = 20;
}
else if(button == this.fifty)
{
tile.setCost(50);
this.cost = 50;
}
else if(button == this.hundreed)
{
tile.setCost(100);
this.cost = 100;
}
else if(button == this.twoHundreed)
{
tile.setCost(200);
this.cost = 200;
}
else if(button == this.fiveHundreed)
{
tile.setCost(500);
this.cost = 500;
}
else if(button == this.validate)
{
if(!(tile.getCost() == 0)) // IF TILE HAS NOT A COST OF 0 THEN WE PASS TO THE OTHER
{
if(!tile.getStackInSlot(0).equals(Blocks.AIR)) // IF SLOT 0 IS NOT BLOCKS.AIR, WE PASS
{
tile.setCreated(true); // CLIENT SET CREATED AT TRUE
final int x = tile.getPos().getX(); // GET X
final int y = tile.getPos().getY(); // GET Y
final int z = tile.getPos().getZ(); // GET Z
int amount = tile.getStackInSlot(0).getCount(); // GET COUNT IN TILE THANKS TO STACK IN SLOT
String name = tile.getStackInSlot(0).getDisplayName(); // GET ITEM NAME IN TILE THANKS TO STACK IN SLOT
tile.setAmount(amount); //CLIENT SET AMOUNT
tile.setItem(name); // CLIENT SET ITEM NAME
playerIn.closeScreen(); // CLOSE SCREEN
ModEconomy.network.sendToServer(new PacketSellerCreated(true, this.cost, name, amount, x,y,z)); // SEND SERVER PACKET FOR CREATED, COST, NAME, AMOUNT, X,Y,Z ARE TILE COORDINATES

}
else
{
playerIn.sendMessage(new TextComponentString("You can't sell air buddy ;)"));
}
}
else // IT MEANS THAT PLAYER HAS NOT SELECTED A COST
{
playerIn.sendMessage(new TextComponentString("You must set a cost for the items."));
}
}
}

}

@Override
public boolean doesGuiPauseGame() 
{
return false;
}

@Override
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) 
{
fontRenderer.drawString(new TextComponentTranslation(I18n.format("title.block_seller")).getFormattedText(), 8, 5, Color.DARK_GRAY.getRGB());
fontRenderer.drawString(new TextComponentTranslation("Inventory").getFormattedText(), 8, 73, Color.DARK_GRAY.getRGB());
}

@Override
protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) 
{
  this.drawDefaultBackground();
      GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); 
      this.mc.getTextureManager().bindTexture(background); 
      int k = (this.width - this.xSize) / 2; 
      int l = (this.height - this.ySize) / 2;
      this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize); 
}
}

Le gui de la personne qui achète :

package fr.fifou.economy.gui;

import java.awt.Color;
import java.io.IOException;

import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.TextComponentString;
import net.minecraft.util.text.TextComponentTranslation;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.world.World;
import net.minecraftforge.fml.client.config.GuiButtonExt;

import org.lwjgl.opengl.GL11;

import fr.fifou.economy.ModEconomy;
import fr.fifou.economy.blocks.tileentity.TileEntityBlockSeller;
import fr.fifou.economy.containers.ContainerSeller;
import fr.fifou.economy.items.ItemCreditcard;
import fr.fifou.economy.packets.PacketCardChange;
import fr.fifou.economy.packets.PacketCardChangeAdmin;
import fr.fifou.economy.packets.PacketCardChangeSeller;
import fr.fifou.economy.packets.PacketSellerCreated;
import fr.fifou.economy.packets.PacketSellerFundsTotal;

public class GuiSellerBuy extends GuiScreen
{
private TileEntityBlockSeller tile;

public GuiSellerBuy(TileEntityBlockSeller tile) 
{
this.tile = tile;

}

private static final ResourceLocation background = new ResourceLocation(ModEconomy.MODID ,"textures/gui/screen/gui_item.png");
protected int xSize = 256;
protected int ySize = 124;
protected int guiLeft;
protected int guiTop;

private GuiButtonExt slot1;
private String item = "";
private int amount;

@Override
public void updateScreen() 
{
super.updateScreen();
amount = tile.getAmount();
}

@Override
public void initGui() 
{
this.guiLeft = (this.width - this.xSize) / 2;
   this.guiTop = (this.height - this.ySize) / 2;
if(tile != null)
{
this.buttonList.add(this.slot1 = new GuiButtonExt(1, width / 2, height / 2 -80, 100, 20, "Buy"));
}
else
{
System.out.println("null");
}

}

@Override
public boolean doesGuiPauseGame() 
{
return false;
}

@Override
protected void actionPerformed(GuiButton button) throws IOException 
{
super.actionPerformed(button);

World worldIn = mc.world;
EntityPlayer player = mc.player;
if(tile != null) // WE CHECK IF TILE IS NOT NULL FOR AVOID CRASH
{
System.out.println("–---------------------BEGIN------------------------");
tile.markDirty();
System.out.println(tile.getAmount());
System.out.println(tile.getOwner());
System.out.println(tile.getCost()); //DEBUG CLIENT & SERVER
System.out.println(tile.getCreated());
System.out.println(tile.getItem());
System.out.println(tile.getFundsTotal());
System.out.println("-----------------------END------------------------"); 

if(button == this.slot1) //IF PLAYER BUY
{
for(int i = 0; i < player.inventory.getSizeInventory(); i++) // WE CHECK FOR THE CREDIT CARD IN PLAYER'S INVENTORY
{
if(player.inventory.getStackInSlot(i) != null) //IF SLOT "i" IS NOT NULL
{
if(player.inventory.getStackInSlot(i).getItem() instanceof ItemCreditcard) // AND THE ITEM IS THE CREDIT CARD
{
ItemStack hasCardIS = player.inventory.getStackInSlot(i); // WE CREATE A NEW ITEM STACK WITH THE CARD IN SLOT
if(hasCardIS.hasTagCompound() && hasCardIS.getTagCompound().hasKey("Owner")) // CHECK IF CARD HAS OWNER
{
String playerCardO = hasCardIS.getTagCompound().getString("OwnerUUID"); // GET THE OWNER UUID IN CARD'S NBT
String playerInWorld = player.getUniqueID().toString(); // GET THE PLAYER UUID IN WORLD

if(playerCardO.equals(playerInWorld)) // IF THEY ARE THE SAME WE PASS
{
if(hasCardIS.getTagCompound().getInteger("Funds") >= tile.getCost()) //IF FUNDS IN CARD ARE SUPERIOR OR EQUAL TO THE COST WE PASS
{
if(hasCardIS.getTagCompound().getBoolean("Linked") == true)
{
if(tile.getAmount() >= 1)
{
tile.markDirty(); //UPDATE TILE ENTITY
int fundTotal = tile.getFundsTotal(); // WE GET THE TOTAL FUNDS
tile.setFundsTotal(fundTotal + tile.getCost()); // CLIENT ADD TOTAL FUNDS + THE COST OF THE ITEM
final int x = tile.getPos().getX(); // GET X COORDINATES
final int y = tile.getPos().getY(); // GET Y COORDINATES
final int z = tile.getPos().getZ(); // GET Z COORDINATES
final int cost = tile.getCost(); // GET COST OF THE TILE ENTITY
int amount = tile.getAmount(); // GET AMOUNT OF THE TILE ENTITY
tile.setAmount(amount -1); // CLIENT SET AMOUNT MINUS ONE EACH TIME HE BUY
ModEconomy.network.sendToServer(new PacketSellerFundsTotal((fundTotal + tile.getCost()), x,y,z, amount)); //SENDING PACKET TO LET SERVER KNOW CHANGES WITH TOTAL FUNDS, COORDINATES AND AMOUNT
ModEconomy.network.sendToServer(new PacketCardChangeSeller(cost)); // SENDING ANOTHER PACKET TO UPDATE CLIENT'S CARD IN SERVER KNOWLEDGE
tile.markDirty();
}
}
}
else // ELSE WE SEND THEM A MESSAGE TO TELL THEY DON'T HAVE ENOUGH FUNDS
{
player.sendMessage(new TextComponentString("You don't have enough funds."));
}
}
else // ELSE WE SEND HIM A MESSAGE TO TELL HIM IT'S NOT HIS CARD
{
System.out.println("not same owner");
}
}
else
{

}
}
}
}
}
}
}

@Override
public void drawScreen(int mouseX, int mouseY, float partialTicks)
{
this.drawDefaultBackground();
// added
       this.mc.getTextureManager().bindTexture(background);
       int i = this.guiLeft;
       int j = this.guiTop;
       this.drawTexturedModalRect(i, j, 0, 0, this.xSize, this.ySize);
this.fontRenderer.drawString(TextFormatting.BOLD + I18n.format("title.ownerCard")+ ": " + String.valueOf(amount), (this.width / 2) - 75, (this.height / 2)- 55, 0x000);

super.drawScreen(mouseX, mouseY, partialTicks);
   }

}

Mes différents packets :

package fr.fifou.economy.packets;

import java.util.UUID;

import fr.fifou.economy.items.ItemCreditcard;

import io.netty.buffer.ByteBuf;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraftforge.fml.common.network.ByteBufUtils;
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler;
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;

public class PacketCardChangeSeller implements IMessage {

private static int cost;

public PacketCardChangeSeller() 
{

}

public PacketCardChangeSeller(int cost)
{
this.cost = cost;

}

public void fromBytes(ByteBuf buf) 
{
this.cost = buf.readInt();
}

public void toBytes(ByteBuf buf) 
{
buf.writeInt(this.cost);
}

public static class Handler implements IMessageHandler <packetcardchangeseller, imessage="">{

public IMessage onMessage(PacketCardChangeSeller message, MessageContext ctx) 
{
EntityPlayer player = ctx.getServerHandler().player; // GET PLAYER
World worldIn = player.world; // GET WORLD

for(int i = 0; i < player.inventory.getSizeInventory(); i++) // CHECK IN PLAYER'S INVENTORY
{
if(player.inventory.getStackInSlot(i) != null) // IF SLOT "i" IS NOT NULL
{
if(player.inventory.getStackInSlot(i).getItem() instanceof ItemCreditcard) // IF SLOT "i" IS ITEM CREDIT CARD
{
ItemStack hasCardIS = player.inventory.getStackInSlot(i); // NEW ITEM STACK FROM "i" SLOT
int fundsPrev = hasCardIS.getTagCompound().getInteger("Funds"); // GET PERVIOUS FUNDS
int costBuy = message.cost; // GET COST BY WHAT WE SENT
hasCardIS.getTagCompound().setInteger("Funds",(fundsPrev - costBuy)); //SERVER SET FUNDS OF CARD BY FUNDSPREV - TILE ENTITY COST
}
}
}
return null;
}
}

}

package fr.fifou.economy.packets;

import fr.fifou.economy.blocks.tileentity.TileEntityBlockSeller;
import io.netty.buffer.ByteBuf;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.fml.common.network.ByteBufUtils;
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler;
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;

public class PacketSellerCreated  implements IMessage 
{
private static boolean created; 
private int cost;
private int x;
private int y;
private int z;
private String name = "";
private int amount = 0;

public PacketSellerCreated() 
{

}

public PacketSellerCreated(boolean createdS,int costS, String nameS, int amountS, int xS, int yS, int zS)
{
this.created = createdS; // WE TAKE BACK THE INFOS FROM GuiSeller
this.x = xS;
this.y = yS;
this.z = zS;
this.name = nameS;
this.amount = amountS;
this.cost = costS;
}

public void fromBytes(ByteBuf buf) 
{
this.created =  buf.readBoolean();
this.cost = buf.readInt();
this.x = buf.readInt();
this.y = buf.readInt();
this.z = buf.readInt();
this.name = ByteBufUtils.readUTF8String(buf);
this.amount = buf.readInt();
}

public void toBytes(ByteBuf buf) 
{
buf.writeBoolean(this.created);
buf.writeInt(this.cost);
buf.writeInt(this.x);
buf.writeInt(this.y);
buf.writeInt(this.z);
ByteBufUtils.writeUTF8String(buf, this.name);
buf.writeInt(this.amount);

}

public static class Handler implements IMessageHandler <packetsellercreated, imessage="">{
public IMessage onMessage(PacketSellerCreated message, MessageContext ctx) 
{
EntityPlayer player = ctx.getServerHandler().player;
World world = player.world;  
BlockPos pos = new BlockPos(message.x, message.y, message.z);
TileEntityBlockSeller te = (TileEntityBlockSeller)world.getTileEntity(pos); //WE TAKE THE POSITION OF THE TILE ENTITY TO ADD INFO
if(te != null) // CHECK IF PLAYER HAS NOT DESTROYED TILE ENTITY IN THE SHORT TIME OF SENDING PACKET
{
te.setCreated(message.created); // SERVER ADD CREATED TO TILE ENTITY
te.setCost(message.cost); // SERVER ADD COST TO TILE ENTITY
te.setItem(message.name); // SERVER ADD NAME TO TILE ENTITY
te.setAmount(message.amount); // SERVER ADD AMOUNT TO TILE ENTITY
}
else
{
System.out.println("null tile entity");
}
return null;
}
}
}

package fr.fifou.economy.packets;

import fr.fifou.economy.blocks.tileentity.TileEntityBlockSeller;
import io.netty.buffer.ByteBuf;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler;
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;

public class PacketSellerFundsTotal implements IMessage {

private int fundstotal;
private int x;
private int y;
private int z;
private int amount;

public PacketSellerFundsTotal() 
{

}

public PacketSellerFundsTotal(int fundstotalS, int xS, int yS, int zS, int amountS)
{
this.fundstotal = fundstotalS;
this.x = xS;
this.y = yS;
this.z = zS;
this.amount = amountS;

}

public void fromBytes(ByteBuf buf) 
{
this.fundstotal = buf.readInt();
this.x = buf.readInt();
this.y = buf.readInt();
this.z = buf.readInt();
this.amount = buf.readInt();
}

public void toBytes(ByteBuf buf) 
{
buf.writeInt(this.fundstotal);
buf.writeInt(this.x);
buf.writeInt(this.y);
buf.writeInt(this.z);
buf.writeInt(this.amount);

}

public static class Handler implements IMessageHandler <packetsellerfundstotal, imessage="">{
public IMessage onMessage(PacketSellerFundsTotal message, MessageContext ctx) 
{
EntityPlayer player = ctx.getServerHandler().player; // GET PLAYER
World world = player.world;  // GET WORLD FROM PLAYER
BlockPos pos = new BlockPos(message.x, message.y, message.z); // NEW BLOCK POS FOR TILE ENTITY COORDINATES
TileEntityBlockSeller te = (TileEntityBlockSeller)world.getTileEntity(pos); // GET THE TILE ENTITY IN WORLD THANKS TO COORDINATES
if(te != null) // IF TILE ENTITY EXIST
{
if(!te.getStackInSlot(0).isEmpty()) // IF THE SLOT IS NOT EMPTY
{
te.setFundsTotal(message.fundstotal); // SERVER SET THE FUNDS TOTAL FROM WHAT WE SENT
te.getStackInSlot(0);
player.addItemStackToInventory(te.getStackInSlot(0).splitStack(1)); // SERVER DIMINUE STACK IN SLOT BY 1
int messAmount = message.amount; // INT THE AMOUNT OF STACK IN SLOT
int newAmount = messAmount - 1; // INT THE NEW AMOUNT OF STACK IN SLOT
te.setAmount(newAmount); // SERVER SET THE NEW AMOUNT OF STACK IN SLOT

}
}

return null;
}
}
}

Voilà j’espère qu’avec l’explication et les commentaires vous aurez compris sinon je suis dispo grâce au discord de MFF 😉

Merci à ceux qui m’aideront ^^

EDIT : Voici le débug que j’ai client et serveur du coup :

[18:03:58] [main/INFO]: [fr.fifou.economy.blocks.BlockSeller:onBlockActivated:95]: –---------------------BEGIN------------------------
64
[18:03:58] [main/INFO]: [fr.fifou.economy.blocks.BlockSeller:onBlockActivated:98]: 1180fda0-fbd6-4eaa-a861-61fd3910f6fc
5
true
[18:03:58] [main/INFO]: [fr.fifou.economy.blocks.BlockSeller:onBlockActivated:101]: Gear
0
[18:03:58] [main/INFO]: [fr.fifou.economy.blocks.BlockSeller:onBlockActivated:103]: –---------------------END------------------------
[18:03:58] [Server thread/INFO]: [fr.fifou.economy.blocks.BlockSeller:onBlockActivated:95]: –---------------------BEGIN------------------------
64
[18:03:58] [Server thread/INFO]: [fr.fifou.economy.blocks.BlockSeller:onBlockActivated:98]: 1180fda0-fbd6-4eaa-a861-61fd3910f6fc
5
true
[18:03:58] [Server thread/INFO]: [fr.fifou.economy.blocks.BlockSeller:onBlockActivated:101]: Gear
0
[18:03:58] [Server thread/INFO]: [fr.fifou.economy.blocks.BlockSeller:onBlockActivated:103]: –---------------------END------------------------

Et si je restart le jeu :

[18:04:35] [Server thread/INFO]: [fr.fifou.economy.blocks.BlockSeller:onBlockActivated:95]: –---------------------BEGIN------------------------
64
[18:04:35] [Server thread/INFO]: [fr.fifou.economy.blocks.BlockSeller:onBlockActivated:98]: 1180fda0-fbd6-4eaa-a861-61fd3910f6fc
5
true
[18:04:35] [Server thread/INFO]: [fr.fifou.economy.blocks.BlockSeller:onBlockActivated:101]: Gear
0
[18:04:35] [Server thread/INFO]: [fr.fifou.economy.blocks.BlockSeller:onBlockActivated:103]: –---------------------END------------------------

Le server à toujours les infos, donc je ne comprend pas pourquoi ca reviens à 0 …

Je vous ajoutes une vidéo car je suis gentil et que c’est ptetre compliquer à comprendre avec un texte ^^

https://www.youtube.com/watch?v=92ZkvkYSPFk&feature=youtu.be</packetsellerfundstotal,></packetsellercreated,></packetcardchangeseller,>