Tabnine Logo
Package.getEffectivePrice
Code IndexAdd Tabnine to your IDE (free)

How to use
getEffectivePrice
method
in
net.buycraft.plugin.data.Package

Best Java code snippets using net.buycraft.plugin.data.Package.getEffectivePrice (Showing top 3 results out of 315)

origin: BuycraftPlugin/BuycraftX

public List<String> format(Currency currency, Package p) {
  NumberFormat format = NumberFormat.getCurrencyInstance(Locale.US);
  format.setCurrency(currency);
  List<String> formatted = new ArrayList<>();
  for (String line : lines) {
    formatted.add(line.replace("%name%", abbreviate(p.getName(), 16))
        .replace("%price%", format.format(p.getEffectivePrice())));
  }
  return formatted;
}
origin: BuycraftPlugin/BuycraftX

    ChatColor.DARK_GREEN +
    ChatColor.BOLD +
    format.format(p.getEffectivePrice());
lore.add(price);
origin: BuycraftPlugin/BuycraftX

private void sendPaginatedMessage(Node node, CommandSource source) {
  PaginationService paginationService = Sponge.getServiceManager().provide(PaginationService.class).get();
  PaginationList.Builder builder = paginationService.builder();
  List<Text> contents = node.getSubcategories().stream()
      .map(category -> Text.builder("> " + category.getName()).color(TextColors.GRAY).onClick(TextActions.executeCallback(commandSource -> {
        if (commandSource instanceof Player) {
          sendPaginatedMessage(node.getChild(category), source);
        }
      })).build()).collect(Collectors.toList());
  for (Package p : node.getPackages()) {
    contents.add(Text.builder(p.getName()).color(TextColors.WHITE).append(Text.builder(" - ").color(TextColors.GRAY).build())
        .append(Text.builder("$x".replace("$", plugin.getServerInformation().getAccount().getCurrency().getSymbol())
            .replace("x", "" + p.getEffectivePrice())).color(TextColors.GREEN).build())
        .onClick(TextActions.executeCallback(commandSource -> {
          if (commandSource instanceof Player) {
            plugin.getPlatform().executeAsync(new SendCheckoutLinkTask(plugin, p.getId(), (Player) commandSource));
          }
        })).build());
  }
  builder.title(Text.builder(plugin.getI18n().get("sponge_listing")).color(TextColors.AQUA).build()).contents(contents).padding(Text.of("-")).sendTo(source);
}
net.buycraft.plugin.dataPackagegetEffectivePrice

Popular methods of Package

  • getId
  • getName
  • getGui_item
  • getOrder
  • getSale

Popular in Java

  • Making http requests using okhttp
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getSupportFragmentManager (FragmentActivity)
  • setScale (BigDecimal)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Runner (org.openjdk.jmh.runner)
  • Top plugins for WebStorm
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