mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07:06:45 +01:00
All changes up to 0.8.21
This commit is contained in:
parent
393fa8dc1d
commit
0111d992eb
@ -1,5 +1,9 @@
|
||||
Changelog:
|
||||
#Versions without changelogs probably had very small misc fixes, like tweaks to the source code#
|
||||
Version 0.8.21
|
||||
Fixed bug where axe criticals would dupe items
|
||||
Version 0.8.20
|
||||
99.99% sure I fixed anvils that suddenly stop working
|
||||
Version 0.8.19
|
||||
Fixed being able to excavate placed blocks
|
||||
Added toggle option to mining requiring a pickaxe
|
||||
|
@ -12,6 +12,7 @@ import org.bukkit.event.block.BlockDamageEvent;
|
||||
import org.bukkit.event.block.BlockFromToEvent;
|
||||
import org.bukkit.event.block.BlockListener;
|
||||
import org.bukkit.event.block.BlockPlaceEvent;
|
||||
import org.bukkit.event.block.BlockRightClickEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public class mcBlockListener extends BlockListener {
|
||||
@ -34,6 +35,14 @@ public class mcBlockListener extends BlockListener {
|
||||
if(block.getTypeId() == 42 && mcLoadProperties.anvilmessages)
|
||||
event.getPlayer().sendMessage(ChatColor.DARK_RED+"You have placed an anvil, anvils can repair tools and armor.");
|
||||
}
|
||||
public void onBlockRightClick(BlockRightClickEvent event) {
|
||||
Block block = event.getBlock();
|
||||
Player player = event.getPlayer();
|
||||
ItemStack is = player.getItemInHand();
|
||||
if(block != null && player != null && mcPermissions.getInstance().repair(player) && block.getTypeId() == 42){
|
||||
mcRepair.getInstance().repairCheck(player, is, block);
|
||||
}
|
||||
}
|
||||
//put all Block related code here
|
||||
public void onBlockDamage(BlockDamageEvent event) {
|
||||
//STARTED(0), DIGGING(1), BROKEN(3), STOPPED(2);
|
||||
|
@ -757,21 +757,6 @@ public class mcCombat {
|
||||
}
|
||||
}
|
||||
}
|
||||
if(x instanceof Player){
|
||||
Player defender = (Player)x;
|
||||
if(defender.getHealth()<= 0 && !mcUsers.getProfile(defender).isDead()){
|
||||
mcUsers.getProfile(defender).setDead(true);
|
||||
event.setCancelled(true); //SEE IF THIS HELPS
|
||||
for(ItemStack herp : defender.getInventory().getContents()){
|
||||
if(herp != null && herp.getTypeId() != 0)
|
||||
defender.getLocation().getWorld().dropItemNaturally(defender.getLocation(), herp);
|
||||
}
|
||||
for(Player derp : plugin.getServer().getOnlinePlayers()){
|
||||
derp.sendMessage(ChatColor.GRAY+attacker.getName() + " has " +ChatColor.DARK_RED+"chopped "+ChatColor.GRAY+defender.getName() + " to death.");
|
||||
mcUsers.getProfile(defender).setDead(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public void parryCheck(Player defender, EntityDamageByEntityEvent event, Entity y){
|
||||
|
@ -77,6 +77,7 @@ public class mcMMO extends JavaPlugin {
|
||||
pm.registerEvent(Event.Type.PLAYER_RESPAWN, playerListener, Priority.Normal, this);
|
||||
pm.registerEvent(Event.Type.PLAYER_ITEM_HELD, playerListener, Priority.Normal, this);
|
||||
pm.registerEvent(Event.Type.ENTITY_DAMAGED, entityListener, Priority.Normal, this);
|
||||
pm.registerEvent(Event.Type.BLOCK_RIGHTCLICKED, blockListener, Priority.Normal, this);
|
||||
//pm.registerEvent(Event.Type.CREATURE_SPAWN, entityListener, Priority.Normal, this);
|
||||
//Displays a message when plugin is loaded
|
||||
PluginDescriptionFile pdfFile = this.getDescription();
|
||||
|
@ -91,10 +91,6 @@ public class mcPlayerListener extends PlayerListener {
|
||||
//STEW, CHECKS HERBALISM SKILL FOR BREAD HP MODIFIERS
|
||||
mcHerbalism.getInstance().stewCheck(player, is);
|
||||
}
|
||||
if(block != null && player != null && mcPermissions.getInstance().repair(player) && block.getTypeId() == 42){
|
||||
//REPAIRCHECK, CHECKS TO MAKE SURE PLAYER IS RIGHT CLICKING AN ANVIL, PLAYER HAS ENOUGH RESOURCES, AND THE ITEM IS NOT AT FULL DURABILITY.
|
||||
mcRepair.getInstance().repairCheck(player, is, block);
|
||||
}
|
||||
}
|
||||
public void onPlayerCommandPreprocess(PlayerChatEvent event){
|
||||
Player player = event.getPlayer();
|
||||
|
@ -1,3 +1,3 @@
|
||||
name: mcMMO
|
||||
main: com.gmail.nossr50.mcMMO
|
||||
version: 0.8.19
|
||||
version: 0.8.20
|
Loading…
Reference in New Issue
Block a user