Register for your free account! | Forgot your password?

Go Back   elitepvpers > Other Online Games > Minecraft
You last visited: Today at 08:53

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Probleme bei meinem PvP Plugin.

Discussion on Probleme bei meinem PvP Plugin. within the Minecraft forum part of the Other Online Games category.

Reply
 
Old 07/25/2013, 17:27   #16
Moderator


 
elite*gold: 558
Join Date: Feb 2010
Posts: 6,544
Received Thanks: 1,424
Ja, ich denke ich kann damit etwas anfangen. Das Zauberwort dabei heist "Lesen":
Quote:
public class InventoryClickEvent
extends InventoryInteractEvent


This event is called when a player clicks a slot in an inventory.

Because InventoryClickEvent occurs within a modification of the Inventory, not all Inventory related methods are safe to use.

The following should never be invoked by an EventHandler for InventoryClickEvent using the HumanEntity or InventoryView associated with this event:
  • HumanEntity.closeInventory()
  • HumanEntity.openInventory(Inventory)
  • HumanEntity.openWorkbench(Location, boolean)
  • HumanEntity.openEnchanting(Location, boolean)
  • InventoryView.close()

To invoke one of these methods, schedule a task using BukkitScheduler.runTask(Plugin, Runnable), which will run the task on the next tick. Also be aware that this is not an exhaustive list, and other methods could potentially create issues as well.


Assuming the EntityHuman associated with this event is an instance of a Player, manipulating the MaxStackSize or contents of an Inventory will require an Invocation of Player.updateInventory().

Modifications to slots that are modified by the results of this InventoryClickEvent can be overwritten. To change these slots, this event should be cancelled and all desired changes to the inventory applied. Alternatively, scheduling a task using BukkitScheduler.runTask( Plugin, Runnable), which would execute the task on the next tick, would work as well.
Muss ich dir diese wunderbare Dokumentation auch noch übersetzen, oder erkennst du das Problem selber?
ComputerBaer is offline  
Thanks
1 User
Old 07/25/2013, 17:29   #17
 
elite*gold: 0
Join Date: Mar 2013
Posts: 297
Received Thanks: 7
Ich sollte den Scheduler nutzen ?

@Kante' habe ich gemacht keine Veränderung...

Könntest du das mit dem Scheduler bitte etwas besser erklären aber trotzdem Danke das du mir das gesagt bzw. geschrieben hast.
SBotDE is offline  
Reply


Similar Threads Similar Threads
Problem bei meinem Bukkit Plugin
06/06/2013 - Minecraft - 1 Replies
WICHTIG: Ich weiss nicht ob ich hier richtig bin, wenn nicht verschiebt mich bitte dahin wo es richtig ist!!! Ich wollte eben ein Plugin programmieren bei dem man mit Rechtsklick mit einer Feder unsichtbar wird. Aber Eclipse zeigt immer Fehler an und ich weiss nicht woran das liegt... Hier der Code: package me.lachgummi978.test; import java.awt.Desktop.Action; import net.minecraft.server.v1_5_R3.ItemStack;
[Bukkit] Fehlermeldung bei meinem Plugin
03/13/2013 - Minecraft - 5 Replies
Folgende Fehlermeldung kommt, wenn ich den Server starte: 2013-03-13 19:47:58 Error occurred while enabling witzcraftBAN v1.0 (Is it up to date?) java.lang.NullPointerException at de.sandor.witzcraft.commands.CommandBAN.<init&g t;(CommandBAN.java:27) at de.sandor.witzcraft.Witzcraft.onEnable(Witzcraft.j ava:17) at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaP lugin.java:217) at org.bukkit.plugin.java.JavaPluginLoader.enablePlug in(JavaPluginLoader.java:457) at...
[Bukkit] Fehlermeldung bei meinem Plugin
01/14/2013 - Minecraft - 4 Replies
Hii, wenn ich mein Plugin auf den Server laden und ihn starte kommt diese Fehlermeldung. 2013-01-14 16:43:13 Could not load 'plugins/witzcraftJOIN.jar' in folder 'plugins' org.bukkit.plugin.InvalidPluginException: java.lang.UnsupportedClassVersionError: de/sandor/witzcraft/witzcraft : Unsupported major.minor version 51.0 at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin (JavaPluginLoader.java:184) at org.bukkit.plugin.SimplePluginManager.loadPlugin(S implePluginManager.java:305)...
[Bukkit] Fehlermeldung bei meinem Plugin
01/03/2013 - Minecraft - 4 Replies
Hii, wenn ich mein Server starte, kommt direkt eine Fehlermeldung von meinem Plugin. Kann mir vielleicht jemand sagen, woran das liegen könnte.
Probleme mit meinem Bot
12/18/2010 - Browsergames - 2 Replies
Ich hab ein Problem. Wenn ich meinen UDOBot starten will, steht gleich danach: A newer version of UDOBot is avaible! Current version: 3.0.2 Newer version: 0.0.0 Aber bei mir ist schon längst die neue Version installiert. Kann mir jemand helfen?



All times are GMT +2. The time now is 08:53.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.