mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 15:16:45 +01:00
Hacky fix for spigot bug
This commit is contained in:
parent
cd6ce5a19d
commit
055391e908
@ -841,27 +841,6 @@ public class EntityListener implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Handle EntityExplode events that involve modifying the event.
|
|
||||||
*
|
|
||||||
* @param event
|
|
||||||
* The event to modify
|
|
||||||
*/
|
|
||||||
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
|
|
||||||
public void onEntityExplodeMonitor(EntityExplodeEvent event) {
|
|
||||||
/* WORLD BLACKLIST CHECK */
|
|
||||||
if(WorldBlacklist.isWorldBlacklisted(event.getEntity().getWorld()))
|
|
||||||
return;
|
|
||||||
|
|
||||||
Entity entity = event.getEntity();
|
|
||||||
|
|
||||||
if (!(entity instanceof TNTPrimed) || !entity.hasMetadata(mcMMO.tntsafeMetadataKey)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
event.blockList().clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle FoodLevelChange events that involve modifying the event.
|
* Handle FoodLevelChange events that involve modifying the event.
|
||||||
*
|
*
|
||||||
|
@ -115,7 +115,6 @@ public class mcMMO extends JavaPlugin {
|
|||||||
public final static String furnaceMetadataKey = "mcMMO: Tracked Furnace";
|
public final static String furnaceMetadataKey = "mcMMO: Tracked Furnace";
|
||||||
public final static String tntMetadataKey = "mcMMO: Tracked TNT";
|
public final static String tntMetadataKey = "mcMMO: Tracked TNT";
|
||||||
public final static String funfettiMetadataKey = "mcMMO: Funfetti";
|
public final static String funfettiMetadataKey = "mcMMO: Funfetti";
|
||||||
public final static String tntsafeMetadataKey = "mcMMO: Safe TNT";
|
|
||||||
public final static String customNameKey = "mcMMO: Custom Name";
|
public final static String customNameKey = "mcMMO: Custom Name";
|
||||||
public final static String customVisibleKey = "mcMMO: Name Visibility";
|
public final static String customVisibleKey = "mcMMO: Name Visibility";
|
||||||
public final static String droppedItemKey = "mcMMO: Tracked Item";
|
public final static String droppedItemKey = "mcMMO: Tracked Item";
|
||||||
|
@ -134,6 +134,7 @@ public class MiningManager extends SkillManager {
|
|||||||
int xp = 0;
|
int xp = 0;
|
||||||
|
|
||||||
float oreBonus = (float) (getOreBonus() / 100);
|
float oreBonus = (float) (getOreBonus() / 100);
|
||||||
|
//TODO: Pretty sure something is fucked with debrisReduction stuff
|
||||||
float debrisReduction = (float) (getDebrisReduction() / 100);
|
float debrisReduction = (float) (getDebrisReduction() / 100);
|
||||||
int dropMultiplier = getDropMultiplier();
|
int dropMultiplier = getDropMultiplier();
|
||||||
|
|
||||||
@ -145,7 +146,8 @@ public class MiningManager extends SkillManager {
|
|||||||
if (BlockUtils.isOre(blockState)) {
|
if (BlockUtils.isOre(blockState)) {
|
||||||
ores.add(blockState);
|
ores.add(blockState);
|
||||||
}
|
}
|
||||||
else {
|
//Server bug that allows beacons to be duped when yield is set to 0
|
||||||
|
else if(blockState.getType() != Material.BEACON) {
|
||||||
debris.add(blockState);
|
debris.add(blockState);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,6 @@ import com.gmail.nossr50.util.skills.SkillActivationType;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
import java.util.Random;
|
|
||||||
import java.util.concurrent.ThreadLocalRandom;
|
import java.util.concurrent.ThreadLocalRandom;
|
||||||
|
|
||||||
public class RandomChanceUtil
|
public class RandomChanceUtil
|
||||||
|
Loading…
Reference in New Issue
Block a user