Jump to content
LeckererNugget

Warum akzeptiert Eclipse .getName nicht?

Recommended Posts

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. 

Share this post


Link to post
Share on other sites

Da fehlt eine geschlossene Klammer und "equalIgnoreCase" müsste "equalsIgnoreCase" heißen.

 

Funktioniert es so?:

 if(e.getInventory().getName().equalsIgnoreCase("Kit")); 

 

 

Edited by Bedrock

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...