LeckererNugget Posted January 25, 2020 Share Posted January 25, 2020 package Kits; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.inventory.InventoryClickEvent; public class Kits implements Listener{ @EventHandler public void Inventory(InventoryClickEvent e) { Player p = (Player) e.getWhoClicked(); if(e.getInventory().getName(.equalIgnoreCase("Kit")); } } _________________________________________________________________________________________ Das ist der Code aber irgendwie akzeptiert der Code .getName() nicht. Link to comment Share on other sites More sharing options...
TileEntity Posted January 25, 2020 Share Posted January 25, 2020 (edited) Da fehlt eine geschlossene Klammer und "equalIgnoreCase" müsste "equalsIgnoreCase" heißen. Funktioniert es so?: if(e.getInventory().getName().equalsIgnoreCase("Kit")); Edited January 25, 2020 by Bedrock Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now