JD Decompiler
This article may meet Wikipedia's criteria for speedy deletion because in its current form it serves only to promote or publicise an entity, person, product, or idea, and would require a fundamental rewrite in order to become encyclopedic. Requester's additional rationale: This article has no encyclopedic content, it only describes the product and then the sample source code, the article has no sources. Other issue is Java Decompiler (aka JD) has not enough notability to have its own article. TheWikiContributor (talk) 01:17, 9 November 2017 (UTC). However, the mere fact that a company, organization, or product is a page's subject does not, on its own, qualify that page for deletion under this criterion. This criterion also does not apply where substantial encyclopedic content would remain after removing the promotional material as deletion is not cleanup; in this case please remove the promotional material yourself, or add the {{advert}} tag to alert others to do so. See CSD G11. If this article does not meet the criteria for speedy deletion, or you intend to fix it, please remove this notice, but do not remove this notice from pages that you have created yourself. If you created this page and you disagree with the given reason for deletion, you can click the button below and leave a message explaining why you believe it should not be deleted. You can also visit the talk page to check if you have received a response to your message. Note that this article may be deleted at any time if it unquestionably meets the speedy deletion criteria, or if an explanation posted to the talk page is found to be insufficient.
Note to administrators: this article has content on its talk page which should be checked before deletion. Administrators: check links, talk, history (last), and logs before deletion. Consider checking Google.This page was last edited by TheWikiContributor (contribs | logs) at 01:17, 9 November 2017 (UTC) (7 years ago) |
![]() | This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these messages)
|
Original author(s) | Emmanuel Dupuy |
---|---|
Stable release | JD-Core 0.7.1 JD-GUI 1.4.0 JD-Eclipse 0.1.5 JD-IntelliJ 0.6 |
Written in | C++, Java |
Platform | Cross-platform |
Available in | English |
Type | Software engineering |
License | GNU GPL 3 |
Website | jd |
JD (Java Decompiler) is a Decompiler for the Java programming language. JD is provided as a GUI tool as well as in the form of plug-ins for the Eclipse (JD-Eclipse) and IntelliJ IDEA (JD-IntelliJ) integrated development environments.
JD supports most versions of Java from 1.1.8 through 1.7.0 as well as JRockit 90_150, Jikes 1.2.2, Eclipse Java Compiler and Apache Harmony and is thus often used where formerly the popular JAD was operated.[citation needed]
package com.loreupdate.Util;
import java.text.DecimalFormat; import java.util.List; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta;
public class LoreUtil {
public static ItemMeta newItemLore(ItemStack itemStack, Double upleave) { ItemMeta itemMeta = itemStack.getItemMeta(); List<String> lore = itemMeta.getLore(); for (int i = 0; i < lore.size(); i++) { if (((String)lore.get(i)).contains("攻击力")) { String newLore = updateLore((String)lore.get(i), upleave); lore.remove(i); lore.add(i, newLore); } if (((String)lore.get(i)).contains("生命值")) { String newlore = updateheal((String)lore.get(i), upleave); lore.remove(i); lore.add(i, newlore); } } itemMeta.setLore(lore); return itemMeta; } private static String updateheal(String s, Double upleave) { int begin = s.indexOf(": ") + 2; String health = s.substring(begin); double nowhealth = Double.valueOf(health).doubleValue() * upleave.doubleValue(); int endHealth = Integer.parseInt(new DecimalFormat("0").format(nowhealth)); return "§2生命值: " + endHealth; } private static String updateLore(String temp, Double upleave) { int begin = temp.indexOf("+") + 1; int end = temp.indexOf("-"); String attactBeg = temp.substring(begin, end); String attactEnd = temp.substring(end + 1, temp.length()); double beg = Double.valueOf(attactBeg).doubleValue() * upleave.doubleValue(); double aend = Double.valueOf(attactEnd).doubleValue() * upleave.doubleValue(); int newbeg = Integer.parseInt(new DecimalFormat("0").format(beg)); int newaend = Integer.parseInt(new DecimalFormat("0").format(aend)); String newAttact = "§2攻击力 +" + newbeg + "-" + newaend; return newAttact; } public static String updateLeave(ItemStack itemStack) { ItemMeta itemMeta = itemStack.getItemMeta(); int begin = 0; if (!itemMeta.getDisplayName().contains("强化")) { return "Leave1"; } if (itemMeta.getDisplayName().contains("强化")) { begin = itemMeta.getDisplayName().indexOf("+") + 1; } String x = itemMeta.getDisplayName().substring(begin, itemMeta.getDisplayName().length() - 1); int le = Integer.parseInt(x) + 1; return "Leave" + le; } public static String updateName(String disName, String leave) { int begin = 0; String nlv = leave.substring(leave.indexOf("ve") + 2); int lv = Integer.parseInt(nlv); if (!disName.contains("强化")) { return disName + "[强化: +1]"; } if (disName.contains("强化")) { begin = disName.indexOf("+") + 1; } String x = disName.substring(begin, disName.length() - 1); int le = Integer.parseInt(x) + 1; String nowlv = String.valueOf(le); if (le <= 10) { return replaceIndex(begin, disName, nowlv); } return replaceIndexe(begin, disName, nowlv); } public static String replaceIndex(int index, String res, String str) { return res.substring(0, index) + str + res.substring(index + 1); } public static Integer updateLeave(String leave) { String nlv = leave.substring(leave.indexOf("ve") + 2); int lv = Integer.parseInt(nlv); return Integer.valueOf(lv); } private static String replaceIndexe(int index, String res, String str) { return res.substring(0, index) + str + res.substring(index + 2); }
}