-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
1,034 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
|
||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>me.bump</groupId> | ||
<artifactId>Bump</artifactId> | ||
<version>1.0</version> | ||
|
||
<properties> | ||
<maven.compiler.source>1.8</maven.compiler.source> | ||
<maven.compiler.target>1.8</maven.compiler.target> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
</properties> | ||
|
||
<repositories> | ||
<repository> | ||
<id>paper-repo</id> | ||
<url>https://repo.destroystokyo.com/repository/maven-public/</url> | ||
</repository> | ||
<repository> | ||
<id>spigot-repo</id> | ||
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url> | ||
</repository> | ||
<repository> | ||
<id>jitpack.io</id> | ||
<url>https://jitpack.io</url> | ||
</repository> | ||
<repository> | ||
<id>bstats-repo</id> | ||
<url>https://repo.codemc.org/repository/maven-public</url> | ||
</repository> | ||
</repositories> | ||
|
||
<build> | ||
<finalName>${project.name} v${project.version}</finalName> | ||
<defaultGoal>clean package</defaultGoal> | ||
<sourceDirectory>${basedir}/src/main/java</sourceDirectory> | ||
|
||
<resources> | ||
<resource> | ||
<directory>${basedir}/src/main/resources</directory> | ||
<filtering>true</filtering> | ||
<includes> | ||
<include>*</include> | ||
</includes> | ||
</resource> | ||
|
||
<resource> | ||
<directory>${basedir}</directory> | ||
<includes> | ||
<include>LICENSE</include> | ||
</includes> | ||
</resource> | ||
|
||
<resource> | ||
<directory>${basedir}/src/main/resources</directory> | ||
<filtering>false</filtering> | ||
<includes> | ||
<include>schematics/*</include> | ||
</includes> | ||
</resource> | ||
</resources> | ||
|
||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-shade-plugin</artifactId> | ||
<version>3.2.4</version> | ||
|
||
<configuration> | ||
|
||
<!-- Shade dependencies into the output jar --> | ||
<relocations> | ||
<relocation> | ||
<pattern>org.bstats</pattern> | ||
<shadedPattern>io.github.thebusybiscuit.exoticgarden.bstats</shadedPattern> | ||
</relocation> | ||
</relocations> | ||
|
||
<!-- Exclude unneeded metadata files from shaded dependencies --> | ||
<filters> | ||
<filter> | ||
<artifact>*:*</artifact> | ||
<excludes> | ||
<exclude>META-INF/*</exclude> | ||
</excludes> | ||
</filter> | ||
</filters> | ||
</configuration> | ||
|
||
<executions> | ||
<execution> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>shade</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.spigotmc</groupId> | ||
<artifactId>spigot-api</artifactId> | ||
<version>1.16.5-R0.1-SNAPSHOT</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.github.slimefun</groupId> | ||
<artifactId>Slimefun4</artifactId> | ||
<version>RC-22</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.google.code.findbugs</groupId> | ||
<artifactId>jsr305</artifactId> | ||
<version>3.0.2</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.bstats</groupId> | ||
<artifactId>bstats-bukkit</artifactId> | ||
<version>2.2.1</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
</dependencies> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/* */ package bxx2004.bump; | ||
/* */ | ||
/* */ import bxx2004.bump.event.FoodEvent; | ||
/* */ import bxx2004.bump.event.MachineEvent; | ||
/* */ import bxx2004.bump.event.ToolsEvent; | ||
/* */ import bxx2004.bump.event.WeaponEvent; | ||
/* */ import io.github.thebusybiscuit.slimefun4.api.SlimefunAddon; | ||
/* */ import org.bukkit.Bukkit; | ||
/* */ import org.bukkit.ChatColor; | ||
/* */ import org.bukkit.plugin.java.JavaPlugin; | ||
/* */ | ||
/* */ | ||
/* */ | ||
/* */ | ||
/* */ public class Bump | ||
/* */ extends JavaPlugin | ||
/* */ implements SlimefunAddon | ||
/* */ { | ||
/* */ public void onEnable() { | ||
/* 22 */ ChatColor.translateAlternateColorCodes('&', "§"); | ||
/* 23 */ Bukkit.getConsoleSender().sendMessage("§b§l[Bump] ->§6§l _____"); | ||
/* 24 */ Bukkit.getConsoleSender().sendMessage("§b§l[Bump] ->§6§l /\\ _`\\ - Slimefun"); | ||
/* 25 */ Bukkit.getConsoleSender().sendMessage("§b§l[Bump] ->§6§l \\ \\ \\L\\ \\ __ __ ___ ___ _____ "); | ||
/* 26 */ Bukkit.getConsoleSender().sendMessage("§b§l[Bump] ->§6§l \\ \\ _ <'/\\ \\/\\ \\ /' __` __`\\/\\ '__`\\ "); | ||
/* 27 */ Bukkit.getConsoleSender().sendMessage("§b§l[Bump] ->§6§l \\ \\ \\L\\ \\ \\ \\_\\ \\/\\ \\/\\ \\/\\ \\ \\ \\L\\ \\"); | ||
/* 28 */ Bukkit.getConsoleSender().sendMessage("§b§l[Bump] ->§6§l \\ \\____/\\ \\____/\\ \\_\\ \\_\\ \\_\\ \\ ,__/"); | ||
/* 29 */ Bukkit.getConsoleSender().sendMessage("§b§l[Bump] ->§6§l \\/___/ \\/___/ \\/_/\\/_/\\/_/\\ \\ \\/ "); | ||
/* 30 */ Bukkit.getConsoleSender().sendMessage("§b§l[Bump] ->§6§l \\ \\_\\ "); | ||
/* 31 */ Bukkit.getConsoleSender().sendMessage("§b§l[Bump] ->§6§l \\/_/ "); | ||
/* 32 */ Bukkit.getConsoleSender().sendMessage("§b§l[Bump] ->§a§l - Powered By bxx2004 | QQ Group: 1153619913"); | ||
/* */ | ||
/* */ | ||
/* */ | ||
/* */ | ||
/* */ | ||
/* */ | ||
/* 39 */ Bukkit.getPluginManager().registerEvents(new WeaponEvent(), this); | ||
/* 40 */ Bukkit.getPluginManager().registerEvents(new MachineEvent(), this); | ||
/* 41 */ Bukkit.getPluginManager().registerEvents(new ToolsEvent(), this); | ||
/* 42 */ Bukkit.getPluginManager().registerEvents(new FoodEvent(), this); | ||
/* */ } | ||
/* */ | ||
/* */ | ||
/* */ public void onDisable() {} | ||
/* */ | ||
/* */ public JavaPlugin getJavaPlugin() { | ||
/* 49 */ return getJavaPlugin(); | ||
/* */ } | ||
/* */ | ||
/* */ | ||
/* */ public String getBugTrackerURL() { | ||
/* 54 */ return "bxx2004"; | ||
/* */ } | ||
/* */ } | ||
|
||
|
||
/* Location: C:\Users\Administrator\Desktop\bump测试\【魔法】Bump_v1.0.jar!\bxx2004\bump\Bump.class | ||
* Java compiler version: 8 (52.0) | ||
* JD-Core Version: 1.1.3 | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/* */ package bxx2004.bump.event; | ||
/* */ | ||
/* */ import bxx2004.bump.sf.Food; | ||
/* */ import io.github.thebusybiscuit.slimefun4.implementation.SlimefunPlugin; | ||
/* */ import org.bukkit.entity.Player; | ||
/* */ import org.bukkit.event.EventHandler; | ||
/* */ import org.bukkit.event.Listener; | ||
/* */ import org.bukkit.event.block.Action; | ||
/* */ import org.bukkit.event.player.PlayerInteractEvent; | ||
/* */ import org.bukkit.potion.PotionEffect; | ||
/* */ import org.bukkit.potion.PotionEffectType; | ||
/* */ | ||
/* */ public class FoodEvent | ||
/* */ implements Listener { | ||
/* */ @EventHandler | ||
/* */ public void onRight(PlayerInteractEvent event) { | ||
/* */ try { | ||
/* 18 */ if (event.getAction() == Action.RIGHT_CLICK_AIR || event.getAction() == Action.RIGHT_CLICK_BLOCK) { | ||
/* 19 */ Player p = event.getPlayer(); | ||
/* 20 */ if (event.getItem().getItemMeta().equals(Food.xueBi_.getItemMeta())) { | ||
/* 21 */ p.setFoodLevel(20); | ||
/* 22 */ SlimefunPlugin.getLocalization().sendActionbarMessage(p, "§b§k|§b- §7§o清凉一夏!", false); | ||
/* 23 */ p.getInventory().getItemInMainHand().setAmount(p.getInventory().getItemInMainHand().getAmount() - 1); | ||
/* */ } | ||
/* 25 */ if (event.getItem().getItemMeta().equals(Food.keLe_.getItemMeta())) { | ||
/* 26 */ SlimefunPlugin.getLocalization().sendActionbarMessage(p, "§b§k|§b- §7§o仙气飘飘!", false); | ||
/* 27 */ p.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, 2000, 5)); | ||
/* 28 */ p.getInventory().getItemInMainHand().setAmount(p.getInventory().getItemInMainHand().getAmount() - 1); | ||
/* */ } | ||
/* 30 */ if (event.getItem().getItemMeta().equals(Food.kouXiangTang_.getItemMeta())) { | ||
/* 31 */ SlimefunPlugin.getLocalization().sendActionbarMessage(p, "§b§k|§b- §7§o仙气飘飘!", false); | ||
/* 32 */ p.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, 2000, 5)); | ||
/* 33 */ p.getInventory().getItemInMainHand().setAmount(p.getInventory().getItemInMainHand().getAmount() - 1); | ||
/* */ } | ||
/* 35 */ if (event.getItem().getItemMeta().equals(Food.laTiao_.getItemMeta())) { | ||
/* 36 */ SlimefunPlugin.getLocalization().sendActionbarMessage(p, "§b§k|§b- §7§o仙气飘飘!", false); | ||
/* 37 */ p.addPotionEffect(new PotionEffect(PotionEffectType.FIRE_RESISTANCE, 2000, 5)); | ||
/* 38 */ p.getInventory().getItemInMainHand().setAmount(p.getInventory().getItemInMainHand().getAmount() - 1); | ||
/* */ } | ||
/* 40 */ if (event.getItem().getItemMeta().equals(Food.fangBianMian_.getItemMeta())) { | ||
/* 41 */ SlimefunPlugin.getLocalization().sendActionbarMessage(p, "§b§k|§b- §7§o仙气飘飘!", false); | ||
/* 42 */ p.getInventory().getItemInMainHand().setAmount(p.getInventory().getItemInMainHand().getAmount() - 1); | ||
/* */ } | ||
/* */ } | ||
/* 45 */ } catch (Exception exception) {} | ||
/* */ } | ||
/* */ } | ||
|
||
|
||
/* Location: C:\Users\Administrator\Desktop\bump测试\【魔法】Bump_v1.0.jar!\bxx2004\bump\event\FoodEvent.class | ||
* Java compiler version: 8 (52.0) | ||
* JD-Core Version: 1.1.3 | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
/* */ package bxx2004.bump.event; | ||
/* */ | ||
/* */ import bxx2004.bump.sf.Machine; | ||
/* */ import io.github.thebusybiscuit.slimefun4.api.events.PlayerRightClickEvent; | ||
/* */ import java.util.ArrayList; | ||
/* */ import java.util.Iterator; | ||
/* */ import java.util.List; | ||
/* */ import java.util.Random; | ||
/* */ import java.util.UUID; | ||
/* */ //import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem; | ||
/* */ import org.bukkit.attribute.Attribute; | ||
/* */ import org.bukkit.attribute.AttributeModifier; | ||
/* */ import org.bukkit.entity.Player; | ||
/* */ import org.bukkit.event.EventHandler; | ||
/* */ import org.bukkit.event.Listener; | ||
/* */ import org.bukkit.inventory.EquipmentSlot; | ||
/* */ import org.bukkit.inventory.meta.ItemMeta; | ||
/* */ | ||
/* */ public class MachineEvent | ||
/* */ implements Listener | ||
/* */ { | ||
/* */ @EventHandler | ||
/* */ public void onRightBlock(PlayerRightClickEvent event) { | ||
/* 24 */ Player p = event.getPlayer(); | ||
/* */ try { | ||
/* 26 */ if (event.getSlimefunBlock().isPresent() && (event.getSlimefunBlock().get()).equals(Machine.appraisal)) | ||
/* 27 */ if (event.getItem().getItemMeta().getLore().contains("§b§k|§b- §7§o武器尚未鉴定...") || event.getItem().getItemMeta().getLore().contains("§b§k|§b- §7§o护甲尚未鉴定...")) { | ||
/* 28 */ Random r = new Random(); | ||
/* 29 */ double ra = r.nextDouble() * 20.0D; | ||
/* 30 */ double ra1 = r.nextDouble() * 20.0D; | ||
/* 31 */ double ra3 = r.nextDouble() * 20.0D; | ||
/* 32 */ ItemMeta meta = event.getItem().getItemMeta(); | ||
/* 33 */ if (event.getItem().getItemMeta().getLore().contains("§b§k|§b- §7§o武器尚未鉴定...")) { | ||
/* */ EquipmentSlot equipmentSlot; | ||
/* 35 */ if (ra3 <= 10.0D) { | ||
/* 36 */ equipmentSlot = EquipmentSlot.HAND; | ||
/* */ } else { | ||
/* 38 */ equipmentSlot = EquipmentSlot.OFF_HAND; | ||
/* */ } | ||
/* 40 */ AttributeModifier modifier = new AttributeModifier(UUID.randomUUID(), "随机属性", ra, AttributeModifier.Operation.ADD_NUMBER, equipmentSlot); | ||
/* 41 */ AttributeModifier modifier1 = new AttributeModifier(UUID.randomUUID(), "随机属性1", ra1, AttributeModifier.Operation.ADD_NUMBER, equipmentSlot); | ||
/* 42 */ meta.removeAttributeModifier(Attribute.GENERIC_ATTACK_DAMAGE); | ||
/* 43 */ meta.removeAttributeModifier(Attribute.GENERIC_ATTACK_SPEED); | ||
/* 44 */ meta.addAttributeModifier(Attribute.GENERIC_ATTACK_DAMAGE, modifier); | ||
/* 45 */ meta.addAttributeModifier(Attribute.GENERIC_ATTACK_SPEED, modifier1); | ||
/* 46 */ } else if (event.getItem().getItemMeta().getLore().contains("§b§k|§b- §7§o护甲尚未鉴定...")) { | ||
/* */ EquipmentSlot equipmentSlot; | ||
/* 48 */ if (ra3 <= 5.0D) { | ||
/* 49 */ equipmentSlot = EquipmentSlot.HEAD; | ||
/* 50 */ } else if (ra3 <= 10.0D) { | ||
/* 51 */ equipmentSlot = EquipmentSlot.CHEST; | ||
/* 52 */ } else if (ra3 <= 15.0D) { | ||
/* 53 */ equipmentSlot = EquipmentSlot.LEGS; | ||
/* */ } else { | ||
/* 55 */ equipmentSlot = EquipmentSlot.FEET; | ||
/* */ } | ||
/* 57 */ AttributeModifier modifier = new AttributeModifier(UUID.randomUUID(), "随机属性", ra, AttributeModifier.Operation.ADD_NUMBER, equipmentSlot); | ||
/* 58 */ AttributeModifier modifier1 = new AttributeModifier(UUID.randomUUID(), "随机属性1", ra1, AttributeModifier.Operation.ADD_NUMBER, equipmentSlot); | ||
/* 59 */ meta.removeAttributeModifier(Attribute.GENERIC_ARMOR); | ||
/* 60 */ meta.removeAttributeModifier(Attribute.GENERIC_ARMOR_TOUGHNESS); | ||
/* 61 */ meta.addAttributeModifier(Attribute.GENERIC_ARMOR, modifier); | ||
/* 62 */ meta.addAttributeModifier(Attribute.GENERIC_ARMOR_TOUGHNESS, modifier1); | ||
/* */ } | ||
/* 64 */ List<String> list = new ArrayList<>(); | ||
/* 65 */ Iterator<String> iterator = meta.getLore().iterator(); | ||
/* 66 */ meta.setLore(list); | ||
/* 67 */ while (iterator.hasNext()) { | ||
/* 68 */ String next = iterator.next(); | ||
/* 69 */ list.remove("§b§k|§b- §7§o已鉴定"); | ||
/* 70 */ list.add(next.replaceAll("§7§o武器尚未鉴定...", "§7§o已鉴定").replaceAll("§7§o护甲尚未鉴定...", "§7§o已鉴定")); | ||
/* 71 */ list.remove("§b§k|§b- §7§o品质: §c⭐⭐⭐⭐⭐"); | ||
/* 72 */ list.remove("§b§k|§b- §7§o品质: §c⭐⭐⭐⭐"); | ||
/* 73 */ list.remove("§b§k|§b- §7§o品质: §c⭐⭐⭐"); | ||
/* 74 */ list.remove("§b§k|§b- §7§o品质: §c⭐⭐"); | ||
/* 75 */ list.remove("§b§k|§b- §7§o品质: §c⭐"); | ||
/* 76 */ list.remove(""); | ||
/* 77 */ list.remove("§b§k|§b- §7§o已经鉴定过了!"); | ||
/* */ } | ||
/* 79 */ list.add(""); | ||
/* 80 */ if (ra >= 15.0D) { | ||
/* 81 */ list.add("§b§k|§b- §7§o品质: §c⭐⭐⭐⭐⭐"); | ||
/* 82 */ } else if (ra < 15.0D && ra >= 10.0D) { | ||
/* 83 */ list.add("§b§k|§b- §7§o品质: §c⭐⭐⭐⭐"); | ||
/* 84 */ } else if (ra < 10.0D && ra >= 7.0D) { | ||
/* 85 */ list.add("§b§k|§b- §7§o品质: §c⭐⭐⭐"); | ||
/* 86 */ } else if (ra < 7.0D && ra >= 5.0D) { | ||
/* 87 */ list.add("§b§k|§b- §7§o品质: §c⭐⭐"); | ||
/* */ } else { | ||
/* 89 */ list.add("§b§k|§b- §7§o品质: §c⭐"); | ||
/* */ } | ||
/* 91 */ list.add(""); | ||
/* 92 */ meta.setLore(list); | ||
/* 93 */ event.getItem().setItemMeta(meta); | ||
/* 94 */ p.sendTitle("§b§k|§b- §7§o鉴定成功!", null, 10, 70, 20); | ||
/* */ } else { | ||
/* 96 */ p.sendTitle("§b§k|§b- §7§o对不起该物品无法鉴定或已经鉴定过了!", null, 10, 70, 20); | ||
/* */ } | ||
/* 98 */ } catch (Exception exception) {} | ||
/* */ } | ||
/* */ } | ||
|
||
|
||
/* Location: C:\Users\Administrator\Desktop\bump测试\【魔法】Bump_v1.0.jar!\bxx2004\bump\event\MachineEvent.class | ||
* Java compiler version: 8 (52.0) | ||
* JD-Core Version: 1.1.3 | ||
*/ |
Oops, something went wrong.