<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Pb de timer]]></title><description><![CDATA[<p dir="auto">comment faire pour que quand je clique droit sur mon item la commande /home la commande s’efectue 30 tick plus tard</p>
<pre><code class="java">public class arceus extends Item
{
private int shootTimer;

public arceus(int par1) {
super(par1);
this.setCreativeTab(pixelmain.pixelcarte);
this.setMaxStackSize(1);
}

public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player)
{
if(player.capabilities.isCreativeMode || player.inventory.hasItem(pixelmain.arceus.itemID))
{
if(shootTimer == 0)
{
ICommandManager icommandmanager = MinecraftServer.getServer().getCommandManager();
icommandmanager.executeCommand(player, "/home");
shootTimer = 2;
}
}
return stack;
}
}
</code></pre>
]]></description><link>https://www.minecraftforgefrance.fr/topic/446/pb-de-timer</link><generator>RSS for Node</generator><lastBuildDate>Mon, 17 Aug 2026 20:35:39 GMT</lastBuildDate><atom:link href="https://www.minecraftforgefrance.fr/topic/446.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 08 Feb 2014 14:01:20 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Pb de timer on Sat, 08 Feb 2014 21:35:30 GMT]]></title><description><![CDATA[<p dir="auto">tick, 20 tick = 1 sec.</p>
]]></description><link>https://www.minecraftforgefrance.fr/post/9612</link><guid isPermaLink="true">https://www.minecraftforgefrance.fr/post/9612</guid><dc:creator><![CDATA[robin4002]]></dc:creator><pubDate>Sat, 08 Feb 2014 21:35:30 GMT</pubDate></item><item><title><![CDATA[Reply to Pb de timer on Sat, 08 Feb 2014 20:49:51 GMT]]></title><description><![CDATA[<p dir="auto">merci beaucoup sa marche nickel t genial par contre le temp du timer et en seconde ou en tick et si il et en tick combien de tick font une seconde</p>
]]></description><link>https://www.minecraftforgefrance.fr/post/9610</link><guid isPermaLink="true">https://www.minecraftforgefrance.fr/post/9610</guid><dc:creator><![CDATA[mrkevin77]]></dc:creator><pubDate>Sat, 08 Feb 2014 20:49:51 GMT</pubDate></item><item><title><![CDATA[Reply to Pb de timer on Sat, 08 Feb 2014 18:40:47 GMT]]></title><description><![CDATA[<pre><code class="java">public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player)
{
timer = 30;
stack.stackSize –;
return stack;
}
</code></pre>
<p dir="auto">Comme ça.</p>
]]></description><link>https://www.minecraftforgefrance.fr/post/9598</link><guid isPermaLink="true">https://www.minecraftforgefrance.fr/post/9598</guid><dc:creator><![CDATA[robin4002]]></dc:creator><pubDate>Sat, 08 Feb 2014 18:40:47 GMT</pubDate></item><item><title><![CDATA[Reply to Pb de timer on Sat, 08 Feb 2014 18:15:10 GMT]]></title><description><![CDATA[<p dir="auto">je rajoute</p>
<p dir="auto">par1ItemStack.stackSize –;</p>
<p dir="auto">return par1ItemStack;<br />
pour quil se retire de l’inventaire mai sa marche pa quesque je doit mettre a la place</p>
]]></description><link>https://www.minecraftforgefrance.fr/post/9596</link><guid isPermaLink="true">https://www.minecraftforgefrance.fr/post/9596</guid><dc:creator><![CDATA[mrkevin77]]></dc:creator><pubDate>Sat, 08 Feb 2014 18:15:10 GMT</pubDate></item><item><title><![CDATA[Reply to Pb de timer on Sat, 08 Feb 2014 14:49:18 GMT]]></title><description><![CDATA[<p dir="auto">J’aurai plutôt mit :</p>
<pre><code class="java">ICommandManager icommandmanager = MinecraftServer.getServer().getCommandManager();
icommandmanager.executeCommand(FakePlayerFactory.getMinecraft(world), "/sudo" + " " + entity.getEntityName() + " " + "home");
</code></pre>
]]></description><link>https://www.minecraftforgefrance.fr/post/9591</link><guid isPermaLink="true">https://www.minecraftforgefrance.fr/post/9591</guid><dc:creator><![CDATA[robin4002]]></dc:creator><pubDate>Sat, 08 Feb 2014 14:49:18 GMT</pubDate></item><item><title><![CDATA[Reply to Pb de timer on Sat, 08 Feb 2014 14:44:53 GMT]]></title><description><![CDATA[<p dir="auto">je me disai aussi mai esque je doit leur autoriser la perm pour la commande car je voudrai kil puisse l’utiliser uniquement avec cette item ou sa pasera avec quelque reglage et si tu pouvais me dire la diff entre le code actuelle et celui ci</p>
<p dir="auto">ICommandManager icommandmanager = MinecraftServer.getServer().getCommandManager();</p>
<p dir="auto">icommandmanager.executeCommand(FakePlayerFactory.getMinecraft(world), “/home” + " " + “” + " " + player.getEntityName() + " " + “”);</p>
]]></description><link>https://www.minecraftforgefrance.fr/post/9590</link><guid isPermaLink="true">https://www.minecraftforgefrance.fr/post/9590</guid><dc:creator><![CDATA[mrkevin77]]></dc:creator><pubDate>Sat, 08 Feb 2014 14:44:53 GMT</pubDate></item><item><title><![CDATA[Reply to Pb de timer on Sat, 08 Feb 2014 14:39:39 GMT]]></title><description><![CDATA[<p dir="auto">ha, j’avais mal compris.</p>
<pre><code class="java">public class arceus extends Item
{
private int timer;

public arceus(int par1) {
super(par1);
this.setCreativeTab(pixelmain.pixelcarte);
this.setMaxStackSize(1);
}

public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player)
{
timer = 30;
return stack;
}

public void onUpdate(ItemStack stack, World world, Entity entity, int id, boolean isCurrent)
{
if(timer &gt; -1 &amp;&amp; entity instanceof EntityPlayer)
{
timer –;
((EntityPlayer)entity).addChatMessage("Temps avant le tp : " + String.valueOf(timer));
}
if(timer == 0 &amp;&amp; entity instanceof EntityPlayer)
{
ICommandManager icommandmanager = MinecraftServer.getServer().getCommandManager();
icommandmanager.executeCommand((EntityPlayer)entity, "/home");
}
}
}
</code></pre>
<p dir="auto">Pour le permission deny, c’est un problème du côté de tes perm (il faut que tu tests sur ton serveur avec essential, en solo ça ne fonctionnera pas).</p>
]]></description><link>https://www.minecraftforgefrance.fr/post/9589</link><guid isPermaLink="true">https://www.minecraftforgefrance.fr/post/9589</guid><dc:creator><![CDATA[robin4002]]></dc:creator><pubDate>Sat, 08 Feb 2014 14:39:39 GMT</pubDate></item><item><title><![CDATA[Reply to Pb de timer on Sat, 08 Feb 2014 14:29:48 GMT]]></title><description><![CDATA[<p dir="auto">il me fai la commande instantanement au lieu de me a faire au bout du temp defini</p>
<p dir="auto">et il me dit do not have this permission</p>
]]></description><link>https://www.minecraftforgefrance.fr/post/9588</link><guid isPermaLink="true">https://www.minecraftforgefrance.fr/post/9588</guid><dc:creator><![CDATA[mrkevin77]]></dc:creator><pubDate>Sat, 08 Feb 2014 14:29:48 GMT</pubDate></item><item><title><![CDATA[Reply to Pb de timer on Sat, 08 Feb 2014 14:09:00 GMT]]></title><description><![CDATA[<pre><code class="java">public class arceus extends Item
{
private int timer;

public arceus(int par1) {
super(par1);
this.setCreativeTab(pixelmain.pixelcarte);
this.setMaxStackSize(1);
}

public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player)
{
if(player.capabilities.isCreativeMode || player.inventory.hasItem(pixelmain.arceus.itemID))
{
if(timer == 0)
{
ICommandManager icommandmanager = MinecraftServer.getServer().getCommandManager();
icommandmanager.executeCommand(player, "/home");
timer = 40;
}
}
return stack;
}
public void onUpdate(ItemStack stack, World world, Entity entity, int id, boolean isCurrent)
{
if(timer &gt; 0)
{
timer –;
}
}

}
</code></pre>
]]></description><link>https://www.minecraftforgefrance.fr/post/9586</link><guid isPermaLink="true">https://www.minecraftforgefrance.fr/post/9586</guid><dc:creator><![CDATA[robin4002]]></dc:creator><pubDate>Sat, 08 Feb 2014 14:09:00 GMT</pubDate></item></channel></rss>