congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Item.getMaxStackSize
Code IndexAdd Tabnine to your IDE (free)

How to use
getMaxStackSize
method
in
cn.nukkit.item.Item

Best Java code snippets using cn.nukkit.item.Item.getMaxStackSize (Showing top 1 results out of 315)

origin: yescallop/EssentialsNK

  public boolean execute(CommandSender sender, String label, String[] args) {
    if (!this.testPermission(sender)) {
      return false;
    }
    if (!this.testIngame(sender)) {
      return false;
    }
    if (args.length != 0) {
      this.sendUsage(sender);
      return false;
    }
    Player player = (Player) sender;
    if (player.isCreative() || player.isSpectator()) {
      sender.sendMessage(TextFormat.RED + Language.translate("commands.more.notavalible"));
      return false;
    }
    Item item = player.getInventory().getItemInHand();
    if (item.getId() == Item.AIR) {
      sender.sendMessage(TextFormat.RED + Language.translate("commands.more.air"));
      return false;
    }
    item.setCount(item.getMaxStackSize());
    player.getInventory().setItemInHand(item);
    sender.sendMessage(Language.translate("commands.more.success"));
    return true;
  }
}
cn.nukkit.itemItemgetMaxStackSize

Popular methods of Item

  • getId
  • getDamage
  • getName
  • setCount
  • setDamage

Popular in Java

  • Parsing JSON documents to java classes using gson
  • addToBackStack (FragmentTransaction)
  • requestLocationUpdates (LocationManager)
  • setRequestProperty (URLConnection)
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • JButton (javax.swing)
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now