mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-24 14:16:45 +01:00
merge master
This commit is contained in:
commit
68d4a179f1
2
.github/workflows/maven.yml
vendored
2
.github/workflows/maven.yml
vendored
@ -49,4 +49,4 @@ jobs:
|
||||
|
||||
# 4. Build via Maven
|
||||
- name: Build via Maven
|
||||
run: mvn verify -B --file pom.xml
|
||||
run: mvn verify -B --file pom.xml -DdisableXmlReport=true
|
||||
|
@ -49,6 +49,30 @@ Version 2.2.000
|
||||
New Power Level Command
|
||||
This power level command gives you a view of all your current masteries, it also provides a summary of your power level.
|
||||
|
||||
Version 2.1.219
|
||||
Added support for various new things from Minecraft 1.20
|
||||
Fixed double drop issue with Beetroots
|
||||
Added 'Camel' to taming experience in experience.yml
|
||||
Added 'Sniffer' to taming experience in experience.yml
|
||||
Added 'Snifflet' to taming experience in experience.yml
|
||||
Added 'Pitcher_Plant' to bonus drops in config.yml
|
||||
Added 'Torchflower' to bonus drops in config.yml
|
||||
Added 'Pink_Petals' to bonus drops in config.yml
|
||||
Added 'Cherry_Log' to bonus drops in config.yml
|
||||
Added 'Cherry_Wood' to bonus drops in config.yml
|
||||
Added 'Camel' to combat experience in experience.yml
|
||||
Added 'Sniffer' to combat experience in experience.yml
|
||||
Added 'Snifflet' to combat experience in experience.yml
|
||||
Added 'Torchflower' to herbalism experience in experience.yml
|
||||
Added 'Pitcher_Plant' to herbalism experience in experience.yml
|
||||
Added 'Pink_Petals' to herbalism experience in experience.yml
|
||||
Added 'Cherry_Log' to woodcutting experience in experience.yml
|
||||
Added 'Cherry_Wood' to woodcutting experience in experience.yml
|
||||
Added 'Stripped_Cherry_Log' to woodcutting experience in experience.yml
|
||||
Added 'Stripped_Cherry_Wood' to woodcutting experience in experience.yml
|
||||
Added 'Skills.Mining.BlastMining.Bonus_Drops.Enabled' to advanced.yml to enable/disable bonus drops from Blast Mining
|
||||
NOTE: There are plans to add experience and potentially subskills for discovering items via the new brushing mechanic, but this will have to wait for new Spigot API to become available
|
||||
|
||||
Version 2.1.218
|
||||
Fixed locale pt_BR type (thanks MrPowerGamerBR)
|
||||
Updated Russian Locale (thanks imDaniX)
|
||||
|
14
pom.xml
14
pom.xml
@ -254,37 +254,37 @@
|
||||
<dependency>
|
||||
<groupId>net.kyori</groupId>
|
||||
<artifactId>adventure-text-serializer-gson</artifactId>
|
||||
<version>4.11.0</version>
|
||||
<version>4.13.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.kyori</groupId>
|
||||
<artifactId>adventure-api</artifactId>
|
||||
<version>4.11.0</version>
|
||||
<version>4.13.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.kyori</groupId>
|
||||
<artifactId>adventure-nbt</artifactId>
|
||||
<version>4.11.0</version>
|
||||
<version>4.13.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.kyori</groupId>
|
||||
<artifactId>adventure-key</artifactId>
|
||||
<version>4.11.0</version>
|
||||
<version>4.13.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.kyori</groupId>
|
||||
<artifactId>adventure-text-serializer-gson-legacy-impl</artifactId>
|
||||
<version>4.11.0</version>
|
||||
<version>4.13.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.kyori</groupId>
|
||||
<artifactId>adventure-platform-bukkit</artifactId>
|
||||
<version>4.1.2</version>
|
||||
<version>4.3.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.kyori</groupId>
|
||||
<artifactId>adventure-platform-api</artifactId>
|
||||
<version>4.1.2</version>
|
||||
<version>4.3.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.scm</groupId>
|
||||
|
@ -24,8 +24,10 @@ public class McnotifyCommand implements TabExecutor {
|
||||
McMMOPlayer mcMMOPlayer = UserManager.getPlayer((Player) sender);
|
||||
|
||||
//Not Loaded yet
|
||||
if (mcMMOPlayer == null)
|
||||
if (mcMMOPlayer == null) {
|
||||
sender.sendMessage(LocaleLoader.getString("Profile.PendingLoad"));
|
||||
return true;
|
||||
}
|
||||
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.Notifications." + (mcMMOPlayer.useChatNotifications() ? "Off" : "On")));
|
||||
mcMMOPlayer.toggleChatNotifications();
|
||||
|
@ -47,21 +47,28 @@ public class InspectCommand implements TabExecutor {
|
||||
|
||||
sender.sendMessage(LocaleLoader.getString("Inspect.OfflineStats", playerName));
|
||||
|
||||
// Sum power level
|
||||
int powerLevel = 0;
|
||||
|
||||
sender.sendMessage(LocaleLoader.getString("Stats.Header.Gathering"));
|
||||
for (PrimarySkillType skill : mcMMO.p.getSkillTools().GATHERING_SKILLS) {
|
||||
sender.sendMessage(CommandUtils.displaySkill(profile, skill));
|
||||
powerLevel += profile.getSkillLevel(skill);
|
||||
}
|
||||
|
||||
sender.sendMessage(LocaleLoader.getString("Stats.Header.Combat"));
|
||||
for (PrimarySkillType skill : mcMMO.p.getSkillTools().COMBAT_SKILLS) {
|
||||
sender.sendMessage(CommandUtils.displaySkill(profile, skill));
|
||||
powerLevel += profile.getSkillLevel(skill);
|
||||
}
|
||||
|
||||
sender.sendMessage(LocaleLoader.getString("Stats.Header.Misc"));
|
||||
for (PrimarySkillType skill : mcMMO.p.getSkillTools().MISC_SKILLS) {
|
||||
sender.sendMessage(CommandUtils.displaySkill(profile, skill));
|
||||
powerLevel += profile.getSkillLevel(skill);
|
||||
}
|
||||
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.PowerLevel", powerLevel));
|
||||
} else {
|
||||
Player target = mcMMOPlayer.getPlayer();
|
||||
boolean isVanished = false;
|
||||
@ -95,9 +102,7 @@ public class InspectCommand implements TabExecutor {
|
||||
CommandUtils.printCombatSkills(target, sender);
|
||||
CommandUtils.printMiscSkills(target, sender);
|
||||
|
||||
if (!isVanished) {
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.PowerLevel", mcMMOPlayer.getPowerLevel()));
|
||||
}
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.PowerLevel", mcMMOPlayer.getPowerLevel()));
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -777,6 +777,10 @@ public class AdvancedConfig extends BukkitConfig {
|
||||
return config.getDouble("Skills.Mining.BlastMining.OreBonus.Rank_" + rank);
|
||||
}
|
||||
|
||||
public boolean isBlastMiningBonusDropsEnabled() {
|
||||
return config.getBoolean("Skills.Mining.BlastMining.Bonus_Drops.Enabled", true);
|
||||
}
|
||||
|
||||
public double getDebrisReduction(int rank) {
|
||||
return config.getDouble("Skills.Mining.BlastMining.DebrisReduction.Rank_" + rank);
|
||||
}
|
||||
|
@ -27,40 +27,6 @@ public enum PrimarySkillType {
|
||||
TAMING,
|
||||
UNARMED,
|
||||
WOODCUTTING;
|
||||
// boolean issueWarning = true;
|
||||
|
||||
/*
|
||||
* Everything below here will be removed in 2.2 (Tridents & Crossbows)
|
||||
* Everything below here will be removed in 2.2 (Tridents & Crossbows)
|
||||
* Everything below here will be removed in 2.2 (Tridents & Crossbows)
|
||||
* Everything below here will be removed in 2.2 (Tridents & Crossbows)
|
||||
* Everything below here will be removed in 2.2 (Tridents & Crossbows)
|
||||
* Everything below here will be removed in 2.2 (Tridents & Crossbows)
|
||||
* Everything below here will be removed in 2.2 (Tridents & Crossbows)
|
||||
* Everything below here will be removed in 2.2 (Tridents & Crossbows)
|
||||
* Everything below here will be removed in 2.2 (Tridents & Crossbows)
|
||||
* Everything below here will be removed in 2.2 (Tridents & Crossbows)
|
||||
* Everything below here will be removed in 2.2 (Tridents & Crossbows)
|
||||
* Everything below here will be removed in 2.2 (Tridents & Crossbows)
|
||||
* Everything below here will be removed in 2.2 (Tridents & Crossbows)
|
||||
* Everything below here will be removed in 2.2 (Tridents & Crossbows)
|
||||
* Everything below here will be removed in 2.2 (Tridents & Crossbows)
|
||||
* Everything below here will be removed in 2.2 (Tridents & Crossbows)
|
||||
*/
|
||||
|
||||
|
||||
// private void processWarning() {
|
||||
// if(issueWarning) {
|
||||
// StackTraceElement[] stackTraceElements = Thread.currentThread().getStackTrace();
|
||||
// Bukkit.getScheduler().scheduleSyncDelayedTask(mcMMO.p, () -> {
|
||||
// mcMMO.p.getLogger().severe("A plugin that hooks into mcMMO via the mcMMO API is using soon to be deprecated API calls. Contact the plugin author and inform them to update their code before it breaks.");
|
||||
// mcMMO.p.getLogger().severe("Deprecation Call from: " + stackTraceElements[2].toString());
|
||||
// mcMMO.p.getLogger().severe("This warning will not repeat itself. Nothing is broken for now, but in the future it will be.");
|
||||
// });
|
||||
//
|
||||
// issueWarning = !issueWarning;
|
||||
// }
|
||||
// }
|
||||
|
||||
/**
|
||||
* WARNING: Being removed in an upcoming update, you should be using mcMMO.getSkillTools() instead
|
||||
|
@ -38,6 +38,7 @@ import org.bukkit.event.block.*;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Locale;
|
||||
|
||||
public class BlockListener implements Listener {
|
||||
private final mcMMO plugin;
|
||||
@ -56,6 +57,12 @@ public class BlockListener implements Listener {
|
||||
return;
|
||||
}
|
||||
|
||||
int tileEntityTolerance = 1;
|
||||
|
||||
// beetroot hotfix, potentially other plants may need this fix
|
||||
if(event.getBlockState().getType() == Material.BEETROOTS)
|
||||
tileEntityTolerance = 2;
|
||||
|
||||
//Track how many "things" are being dropped
|
||||
HashSet<Material> uniqueMaterials = new HashSet<>();
|
||||
boolean dontRewardTE = false; //If we suspect TEs are mixed in with other things don't reward bonus drops for anything that isn't a block
|
||||
@ -70,7 +77,7 @@ public class BlockListener implements Listener {
|
||||
blockCount++;
|
||||
}
|
||||
|
||||
if(uniqueMaterials.size() > 1) {
|
||||
if(uniqueMaterials.size() > tileEntityTolerance) {
|
||||
//Too many things are dropping, assume tile entities might be duped
|
||||
//Technically this would also prevent something like coal from being bonus dropped if you placed a TE above a coal ore when mining it but that's pretty edge case and this is a good solution for now
|
||||
dontRewardTE = true;
|
||||
|
@ -361,40 +361,30 @@ public class EntityListener implements Listener {
|
||||
|
||||
//Friendly fire checks
|
||||
if (defender instanceof Player defendingPlayer) {
|
||||
Player attackingPlayer;
|
||||
|
||||
//If the attacker is a Player or a projectile belonging to a player
|
||||
if(attacker instanceof Projectile || attacker instanceof Player) {
|
||||
if(attacker instanceof Projectile projectile) {
|
||||
if(((Projectile) attacker).getShooter() instanceof Player) {
|
||||
attackingPlayer = (Player) projectile.getShooter();
|
||||
if(attacker instanceof Projectile projectile) {
|
||||
if(projectile.getShooter() instanceof Player attackingPlayer && !attackingPlayer.equals(defendingPlayer)) {
|
||||
//Check for party friendly fire and cancel the event
|
||||
if (checkParties(event, defendingPlayer, attackingPlayer)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//Check for party friendly fire and cancel the event
|
||||
if (checkParties(event, defendingPlayer, attackingPlayer))
|
||||
{
|
||||
//Deflect checks
|
||||
final McMMOPlayer mcMMOPlayer = UserManager.getPlayer(defendingPlayer);
|
||||
if (mcMMOPlayer != null) {
|
||||
UnarmedManager unarmedManager = mcMMOPlayer.getUnarmedManager();
|
||||
|
||||
if (unarmedManager.canDeflect()) {
|
||||
if (projectile instanceof Arrow && unarmedManager.deflectCheck()) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//Deflect checks
|
||||
final McMMOPlayer mcMMOPlayer = UserManager.getPlayer(defendingPlayer);
|
||||
if (mcMMOPlayer != null) {
|
||||
UnarmedManager unarmedManager = mcMMOPlayer.getUnarmedManager();
|
||||
|
||||
if (unarmedManager.canDeflect()) {
|
||||
if (projectile instanceof Arrow && unarmedManager.deflectCheck()) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
attackingPlayer = (Player) attacker;
|
||||
//Check for party friendly fire and cancel the event
|
||||
if (checkParties(event, defendingPlayer, attackingPlayer))
|
||||
return;
|
||||
}
|
||||
} else if (attacker instanceof Player attackingPlayer){
|
||||
if (checkParties(event, defendingPlayer, attackingPlayer))
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -40,10 +40,7 @@ import org.bukkit.inventory.PlayerInventory;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
|
||||
public class HerbalismManager extends SkillManager {
|
||||
public HerbalismManager(McMMOPlayer mcMMOPlayer) {
|
||||
@ -771,35 +768,39 @@ public class HerbalismManager extends SkillManager {
|
||||
PlayerInventory playerInventory = player.getInventory();
|
||||
Material seed;
|
||||
|
||||
switch (blockState.getType()) {
|
||||
case CARROTS:
|
||||
seed = Material.CARROT;
|
||||
switch (blockState.getType().getKey().getKey().toLowerCase(Locale.ROOT)) {
|
||||
case "carrots":
|
||||
seed = Material.matchMaterial("CARROT");
|
||||
break;
|
||||
|
||||
case WHEAT:
|
||||
seed = Material.WHEAT_SEEDS;
|
||||
case "wheat":
|
||||
seed = Material.matchMaterial("WHEAT_SEEDS");
|
||||
break;
|
||||
|
||||
case NETHER_WART:
|
||||
seed = Material.NETHER_WART;
|
||||
case "nether_wart":
|
||||
seed = Material.getMaterial("NETHER_WART");
|
||||
break;
|
||||
|
||||
case POTATOES:
|
||||
seed = Material.POTATO;
|
||||
case "potatoes":
|
||||
seed = Material.matchMaterial("POTATO");
|
||||
break;
|
||||
|
||||
case BEETROOTS:
|
||||
seed = Material.BEETROOT_SEEDS;
|
||||
case "beetroots":
|
||||
seed = Material.matchMaterial("BEETROOT_SEEDS");
|
||||
break;
|
||||
|
||||
case COCOA:
|
||||
seed = Material.COCOA_BEANS;
|
||||
case "cocoa":
|
||||
seed = Material.matchMaterial("COCOA_BEANS");
|
||||
break;
|
||||
|
||||
case "torchflower":
|
||||
seed = Material.matchMaterial("TORCHFLOWER_SEEDS");
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
ItemStack seedStack = new ItemStack(seed);
|
||||
|
||||
if (ItemUtils.isAxe(blockBreakEvent.getPlayer().getInventory().getItemInMainHand())
|
||||
@ -850,17 +851,17 @@ public class HerbalismManager extends SkillManager {
|
||||
return true;
|
||||
}
|
||||
|
||||
switch (blockState.getType()) {
|
||||
switch (blockState.getType().getKey().getKey()) {
|
||||
|
||||
case POTATOES:
|
||||
case CARROTS:
|
||||
case WHEAT:
|
||||
case "potatoes":
|
||||
case "carrots":
|
||||
case "wheat":
|
||||
|
||||
finalAge = getGreenThumbStage(greenTerra);
|
||||
break;
|
||||
|
||||
case BEETROOTS:
|
||||
case NETHER_WART:
|
||||
case "beetroots":
|
||||
case "nether_wart":
|
||||
|
||||
if (greenTerra || greenThumbStage > 2) {
|
||||
finalAge = 2;
|
||||
@ -871,9 +872,9 @@ public class HerbalismManager extends SkillManager {
|
||||
else {
|
||||
finalAge = 0;
|
||||
}
|
||||
break;
|
||||
break;
|
||||
|
||||
case COCOA:
|
||||
case "cocoa":
|
||||
|
||||
if (getGreenThumbStage(greenTerra) >= 2) {
|
||||
finalAge = 1;
|
||||
@ -887,6 +888,7 @@ public class HerbalismManager extends SkillManager {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
//Start the delayed replant
|
||||
startReplantTask(finalAge, blockBreakEvent, blockState, false);
|
||||
return true;
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.gmail.nossr50.skills.mining;
|
||||
|
||||
import com.gmail.nossr50.api.ItemSpawnReason;
|
||||
import com.gmail.nossr50.config.AdvancedConfig;
|
||||
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
||||
import com.gmail.nossr50.datatypes.experience.XPGainReason;
|
||||
import com.gmail.nossr50.datatypes.interactions.NotificationType;
|
||||
@ -216,7 +217,7 @@ public class MiningManager extends SkillManager {
|
||||
|
||||
Misc.spawnItem(getPlayer(), Misc.getBlockCenter(blockState), new ItemStack(blockState.getType()), ItemSpawnReason.BLAST_MINING_ORES); // Initial block that would have been dropped
|
||||
|
||||
if (!mcMMO.getPlaceStore().isTrue(blockState)) {
|
||||
if (mcMMO.p.getAdvancedConfig().isBlastMiningBonusDropsEnabled() && !mcMMO.getPlaceStore().isTrue(blockState)) {
|
||||
for (int i = 1; i < dropMultiplier; i++) {
|
||||
// Bukkit.broadcastMessage("Bonus Drop on Ore: "+blockState.getType().toString());
|
||||
Misc.spawnItem(getPlayer(), Misc.getBlockCenter(blockState), new ItemStack(blockState.getType()), ItemSpawnReason.BLAST_MINING_ORES_BONUS_DROP); // Initial block that would have been dropped
|
||||
@ -303,21 +304,16 @@ public class MiningManager extends SkillManager {
|
||||
* @return the Blast Mining tier
|
||||
*/
|
||||
public int getDropMultiplier() {
|
||||
switch(getBlastMiningTier()) {
|
||||
case 8:
|
||||
case 7:
|
||||
return 3;
|
||||
case 6:
|
||||
case 5:
|
||||
case 4:
|
||||
case 3:
|
||||
return 2;
|
||||
case 2:
|
||||
case 1:
|
||||
return 1;
|
||||
default:
|
||||
return 0;
|
||||
if (mcMMO.p.getAdvancedConfig().isBlastMiningBonusDropsEnabled()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return switch (getBlastMiningTier()) {
|
||||
case 8, 7 -> 3;
|
||||
case 6, 5, 4, 3 -> 2;
|
||||
case 2, 1 -> 1;
|
||||
default -> 0;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -22,6 +22,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
public final class ItemUtils {
|
||||
/**
|
||||
@ -413,31 +414,31 @@ public final class ItemUtils {
|
||||
*/
|
||||
public static boolean isHerbalismDrop(ItemStack item) {
|
||||
//TODO: 1.14 This needs to be updated
|
||||
switch (item.getType()) {
|
||||
case WHEAT:
|
||||
case WHEAT_SEEDS:
|
||||
case CARROT:
|
||||
case CHORUS_FRUIT:
|
||||
case CHORUS_FLOWER:
|
||||
case POTATO:
|
||||
case BEETROOT:
|
||||
case BEETROOTS:
|
||||
case BEETROOT_SEEDS:
|
||||
case NETHER_WART:
|
||||
case BROWN_MUSHROOM:
|
||||
case RED_MUSHROOM:
|
||||
case ROSE_BUSH:
|
||||
case DANDELION:
|
||||
case CACTUS:
|
||||
case SUGAR_CANE:
|
||||
case MELON:
|
||||
case MELON_SEEDS:
|
||||
case PUMPKIN:
|
||||
case PUMPKIN_SEEDS:
|
||||
case LILY_PAD:
|
||||
case VINE:
|
||||
case TALL_GRASS:
|
||||
case COCOA_BEANS:
|
||||
switch (item.getType().getKey().getKey().toLowerCase()) {
|
||||
case "wheat":
|
||||
case "wheat_seeds":
|
||||
case "carrot":
|
||||
case "chorus_fruit":
|
||||
case "chorus_flower":
|
||||
case "potato":
|
||||
case "beetroot":
|
||||
case "beetroots":
|
||||
case "beetroot_seeds":
|
||||
case "nether_wart":
|
||||
case "brown_mushroom":
|
||||
case "red_mushroom":
|
||||
case "rose_bush":
|
||||
case "dandelion":
|
||||
case "cactus":
|
||||
case "sugar_cane":
|
||||
case "melon":
|
||||
case "melon_seeds":
|
||||
case "pumpkin":
|
||||
case "pumpkin_seeds":
|
||||
case "lily_pad":
|
||||
case "vine":
|
||||
case "tall_grass":
|
||||
case "cocoa_beans":
|
||||
return true;
|
||||
|
||||
default:
|
||||
@ -445,6 +446,7 @@ public final class ItemUtils {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Checks to see if an item is a mob drop.
|
||||
*
|
||||
|
@ -1017,6 +1017,7 @@ public class MaterialMapStore {
|
||||
private void fillTreeFellerDestructibleWhiteList()
|
||||
{
|
||||
treeFellerDestructibleWhiteList.add("oak_leaves");
|
||||
treeFellerDestructibleWhiteList.add("cherry_leaves");
|
||||
treeFellerDestructibleWhiteList.add("acacia_leaves");
|
||||
treeFellerDestructibleWhiteList.add("birch_leaves");
|
||||
treeFellerDestructibleWhiteList.add("dark_oak_leaves");
|
||||
@ -1171,6 +1172,7 @@ public class MaterialMapStore {
|
||||
|
||||
private void fillToolBlackList()
|
||||
{
|
||||
toolBlackList.add("chiseled_bookshelf");
|
||||
toolBlackList.add("black_bed");
|
||||
toolBlackList.add("blue_bed");
|
||||
toolBlackList.add("brown_bed");
|
||||
@ -1256,17 +1258,28 @@ public class MaterialMapStore {
|
||||
toolBlackList.add("yellow_shulker_box");
|
||||
toolBlackList.add("shulker_box");
|
||||
toolBlackList.add("acacia_sign");
|
||||
toolBlackList.add("acacia_hanging_sign");
|
||||
toolBlackList.add("acacia_wall_sign");
|
||||
toolBlackList.add("birch_sign");
|
||||
toolBlackList.add("birch_hanging_sign");
|
||||
toolBlackList.add("birch_wall_sign");
|
||||
toolBlackList.add("dark_oak_sign");
|
||||
toolBlackList.add("dark_oak_hanging_sign");
|
||||
toolBlackList.add("dark_oak_wall_sign");
|
||||
toolBlackList.add("jungle_sign");
|
||||
toolBlackList.add("jungle_hanging_sign");
|
||||
toolBlackList.add("jungle_wall_sign");
|
||||
toolBlackList.add("spruce_sign");
|
||||
toolBlackList.add("spruce_hanging_sign");
|
||||
toolBlackList.add("spruce_wall_sign");
|
||||
toolBlackList.add("oak_sign");
|
||||
toolBlackList.add("oak_hanging_sign");
|
||||
toolBlackList.add("oak_wall_sign");
|
||||
toolBlackList.add("cherry_sign");
|
||||
toolBlackList.add("cherry_hanging_sign");
|
||||
toolBlackList.add("cherry_wall_sign");
|
||||
toolBlackList.add("stripped_cherry_log");
|
||||
toolBlackList.add("stripped_cherry_wood");
|
||||
toolBlackList.add("stripped_acacia_log");
|
||||
toolBlackList.add("stripped_acacia_wood");
|
||||
toolBlackList.add("stripped_birch_log");
|
||||
@ -1308,6 +1321,7 @@ public class MaterialMapStore {
|
||||
toolBlackList.add("lodestone");
|
||||
toolBlackList.add("respawn_anchor");
|
||||
toolBlackList.add("sweet_berry_bush");
|
||||
toolBlackList.add("smithing_table");
|
||||
}
|
||||
|
||||
public boolean isIntendedToolPickaxe(@NotNull Material material) {
|
||||
|
@ -8,6 +8,7 @@ import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||
import com.gmail.nossr50.events.fake.FakeEntityDamageByEntityEvent;
|
||||
import com.gmail.nossr50.events.fake.FakeEntityDamageEvent;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.metadata.MobMetaFlagType;
|
||||
import com.gmail.nossr50.metadata.MobMetadataService;
|
||||
@ -885,8 +886,14 @@ public final class CombatUtils {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean canDamage(@NotNull Entity attacker, @NotNull Entity target, @NotNull DamageCause damageCause, double damage) {
|
||||
EntityDamageEvent damageEvent = new FakeEntityDamageByEntityEvent(attacker, target, damageCause, damage);
|
||||
public static boolean canDamage(@Nullable Entity attacker, @NotNull Entity target, @NotNull DamageCause damageCause, double damage) {
|
||||
EntityDamageEvent damageEvent;
|
||||
if (attacker != null) {
|
||||
damageEvent = new FakeEntityDamageByEntityEvent(attacker, target, damageCause, damage);
|
||||
} else {
|
||||
damageEvent = new FakeEntityDamageEvent(target, damageCause, damage);
|
||||
}
|
||||
|
||||
mcMMO.p.getServer().getPluginManager().callEvent(damageEvent);
|
||||
|
||||
return !damageEvent.isCancelled();
|
||||
|
@ -299,6 +299,8 @@ Skills:
|
||||
RetroMode: 1000
|
||||
|
||||
BlastMining:
|
||||
Bonus_Drops:
|
||||
Enabled: true
|
||||
# BlastDamageDecrease Ranks: % of damage reduced from TNT explosions
|
||||
BlastDamageDecrease:
|
||||
Rank_1: 0.0
|
||||
|
@ -468,6 +468,9 @@ Green_Thumb_Replanting_Crops:
|
||||
###
|
||||
Bonus_Drops:
|
||||
Herbalism:
|
||||
Pitcher_Plant: true
|
||||
Torchflower: true
|
||||
Pink_Petals: true
|
||||
Glow_Berries: true
|
||||
Cave_Vines: true
|
||||
Cave_Vines_Plant: true
|
||||
@ -605,6 +608,8 @@ Bonus_Drops:
|
||||
Acacia_Log: true
|
||||
Birch_Wood: true
|
||||
Birch_Log: true
|
||||
Cherry_Wood: true
|
||||
Cherry_Log: true
|
||||
Dark_Oak_Wood: true
|
||||
Dark_Oak_Log: true
|
||||
Oak_Wood: true
|
||||
|
@ -277,18 +277,21 @@ Experience_Values:
|
||||
Crimson_Stem: 35
|
||||
Warped_Stem: 35
|
||||
Oak_Log: 70
|
||||
Cherry_Log: 105
|
||||
Spruce_Log: 80
|
||||
Birch_Log: 90
|
||||
Jungle_Log: 100
|
||||
Acacia_Log: 90
|
||||
Dark_Oak_Log: 90
|
||||
Stripped_Oak_Log: 70
|
||||
Stripped_Cherry_Log: 105
|
||||
Stripped_Spruce_Log: 80
|
||||
Stripped_Birch_Log: 90
|
||||
Stripped_Jungle_Log: 100
|
||||
Stripped_Acacia_Log: 90
|
||||
Stripped_Dark_Oak_Log: 90
|
||||
Stripped_Oak_Wood: 70
|
||||
Stripped_Cherry_Wood: 70
|
||||
Stripped_Spruce_Wood: 80
|
||||
Stripped_Birch_Wood: 90
|
||||
Stripped_Jungle_Wood: 100
|
||||
@ -298,6 +301,7 @@ Experience_Values:
|
||||
Stripped_Crimson_Stem: 50
|
||||
Stripped_Warped_Stem: 50
|
||||
Oak_Wood: 70
|
||||
Cherry_Wood: 105
|
||||
Spruce_Wood: 70
|
||||
Birch_Wood: 70
|
||||
Jungle_Wood: 70
|
||||
@ -310,6 +314,8 @@ Experience_Values:
|
||||
Brown_Mushroom_Block: 70
|
||||
Mushroom_Stem: 80
|
||||
Herbalism:
|
||||
Pitcher_Plant: 160
|
||||
Pink_Petals: 10
|
||||
Small_Dripleaf: 140
|
||||
Big_Dripleaf: 140
|
||||
Cave_Vines: 90
|
||||
@ -401,6 +407,7 @@ Experience_Values:
|
||||
Cornflower: 150
|
||||
Lily_Of_The_Valley: 150
|
||||
Wither_Rose: 500
|
||||
Torchflower: 90
|
||||
Mining:
|
||||
Sculk: 4
|
||||
Sculk_Vein: 3
|
||||
@ -541,6 +548,9 @@ Experience_Values:
|
||||
Cobbled_Deepslate: 5
|
||||
Taming:
|
||||
Animal_Taming:
|
||||
Camel: 1300
|
||||
Sniffer: 1500
|
||||
Snifflet: 900
|
||||
Llama: 1200
|
||||
Wolf: 250
|
||||
Ocelot: 500
|
||||
@ -633,3 +643,6 @@ Experience_Values:
|
||||
Frog: 1.7
|
||||
Warden: 6.0
|
||||
Tadpole: 0.2
|
||||
Sniffer: 1.1
|
||||
Snifflet: 1.1
|
||||
Camel: 1.2
|
||||
|
@ -999,12 +999,12 @@ Skills.Parents=主技能
|
||||
Skills.Stats={0}&a{1}&3 XP(&7{2}&3/&7{3}&3)
|
||||
Skills.ChildStats={0}&a{1}
|
||||
Skills.MaxXP=最大
|
||||
Skills.TooTired=你太累了暂时无法使用该技能.&e({0}s)
|
||||
Skills.TooTired=你太累了,暂时无法使用该技能.&e({0}s)
|
||||
Skills.TooTired.Named=&7(&6{0}&e {1}s&7)
|
||||
Skills.TooTired.Extra=&6{0} &e技能冷却时间 - {1}
|
||||
Skills.Cancelled=&6{0} &c已取消!
|
||||
Skills.ConfirmOrCancel=&a再次右键以确定 &6{0}&a. 左键取消.
|
||||
Skills.AbilityGateRequirementFail=&7你需要 &e{0}&7 级以上的 &3{1}&7 来使用这个能力.
|
||||
Skills.AbilityGateRequirementFail=&7你还需要提升 &e{0}&7 级 &3{1}&7 才能使用这个能力.
|
||||
#数据
|
||||
Stats.Header.Combat=&6-=格斗技能=-
|
||||
Stats.Header.Gathering=&6-=采集技能=-
|
||||
@ -1066,7 +1066,7 @@ Commands.Description.addlevels=给玩家增加 mcMMO 等级
|
||||
Commands.Description.adminchat=切换 mcMMO 管理员聊天或发送管理员聊天信息
|
||||
Commands.Description.addxp=给玩家增加 mcMMO 经验
|
||||
Commands.Description.hardcore=修改 mcMMO hardcore 百分比或切换 hardcore 模式开/关
|
||||
Commands.Description.inspect=查看玩家详细的 mcMMO 信息
|
||||
Commands.Description.inspect=查看玩家的 mcMMO 详细信息
|
||||
Commands.Description.mcability=切换 mcMMO 技能右键激活 开/关
|
||||
Commands.Description.mccooldown=查看所有mcMMO技能冷却时间
|
||||
Commands.Description.mcchatspy=切换对完聊天监视开/关
|
||||
@ -1095,8 +1095,8 @@ Commands.Description.vampirism=更改 mcMMO 榨取百分比 或切换 vampirism
|
||||
Commands.Description.xplock=锁定指定 mcMMO 技能的经验条
|
||||
Commands.Description.xprate=更改 mcMMO 经验倍率或开启一个 mcMMO 经验翻倍事件
|
||||
#更新检查器
|
||||
UpdateChecker.Outdated=你正在使用这一个旧版本的 mcMMO!
|
||||
UpdateChecker.NewAvailable=Spigot 上有一个新版本.
|
||||
UpdateChecker.Outdated=你正在使用旧版本的 mcMMO!
|
||||
UpdateChecker.NewAvailable=在 Spigot 上有一个新版本.
|
||||
#记分板抬头
|
||||
Scoreboard.Header.PlayerStats=&emcMMO 统计
|
||||
Scoreboard.Header.PlayerCooldowns=&emcMMO 冷却
|
||||
@ -1111,7 +1111,7 @@ Scoreboard.Misc.Cooldown=&d冷却
|
||||
Scoreboard.Misc.Overall=&6总体
|
||||
Scoreboard.Misc.Ability=能力
|
||||
#数据库恢复
|
||||
Profile.PendingLoad=&c你的mcMMO玩家数据未加载.
|
||||
Profile.PendingLoad=&c你的mcMMO玩家数据未正常加载.
|
||||
Profile.Loading.Success=&a你的mcMMO数据已加载
|
||||
Profile.Loading.Failure=&cmcMMO 无法加载你的数据. 请联系 &b服务器管理员反馈你的问题.\n&e你可以继续在服务器游玩, 但是你 &l没有mcMMO等级&e 并且你获得的任何经验都 &l不会被保存&e.
|
||||
Profile.Loading.AdminFailureNotice=&4[A]&c mcMMO 无法加载玩家 &e{0}&c 的数据. &d请检查你的数据库.
|
||||
|
Loading…
Reference in New Issue
Block a user