mcMMO 1.0.05

This commit is contained in:
nossr50 2011-04-30 18:33:25 -07:00
parent dfd7f8839c
commit 139f50c5d1
4 changed files with 62 additions and 42 deletions

View File

@ -1,5 +1,12 @@
Changelog:
#Versions without changelogs probably had very small misc fixes, like tweaks to the source code
Version 1.0.05
PVP interactions now check for permissions before handing out any experience
Many skill abilities now check for permissions correctly
All interactions with Taming now check for permissions
mcMMO now checks for its pvp flag being true before handling pvp interactions
Version 1.0.04
Fixed bug where players would be informed incorrectly when their cooldowns refreshed
Fixed exploit where players could reconnect to reset their cooldowns

View File

@ -60,10 +60,11 @@ public class Combat {
combatAbilityChecks(attacker, PPa, pluginx);
//Check for offensive procs
if(mcPermissions.getInstance().axes(attacker))
Axes.axeCriticalCheck(attacker, eventb, pluginx); //Axe Criticals
if(!Config.getInstance().isBleedTracked(event.getEntity())) //Swords Bleed
Swords.bleedCheck(attacker, event.getEntity(), pluginx);
if(event.getEntity() instanceof Player){
if(event.getEntity() instanceof Player && mcPermissions.getInstance().unarmed(attacker)){
Player defender = (Player)event.getEntity();
Unarmed.disarmProcCheck(attacker, defender);
}
@ -88,11 +89,11 @@ public class Combat {
{
if(System.currentTimeMillis() >= PPd.getRespawnATS() + 5000 && defender.getHealth() >= 1)
{
if(m.isAxes(attacker.getItemInHand()))
if(m.isAxes(attacker.getItemInHand()) && mcPermissions.getInstance().axes(attacker))
PPa.addAxesXP((event.getDamage() * 3) * LoadProperties.pvpxprewardmodifier);
if(m.isSwords(attacker.getItemInHand()))
if(m.isSwords(attacker.getItemInHand()) && mcPermissions.getInstance().swords(attacker))
PPa.addSwordsXP((event.getDamage() * 3) * LoadProperties.pvpxprewardmodifier);
if(attacker.getItemInHand().getTypeId() == 0)
if(attacker.getItemInHand().getTypeId() == 0 && mcPermissions.getInstance().unarmed(attacker))
PPa.addUnarmedXP((event.getDamage() * 3) * LoadProperties.pvpxprewardmodifier);
}
}
@ -148,7 +149,7 @@ public class Combat {
{
Player master = Taming.getOwner(eventb.getDamager(), pluginx);
PlayerProfile PPo = Users.getProfile(master);
if(mcPermissions.getInstance().taming(master)){
//Sharpened Claws
if(PPo.getTamingInt() >= 750)
{
@ -173,6 +174,7 @@ public class Combat {
}
}
}
}
//Another offensive check for Archery
if(event instanceof EntityDamageByProjectileEvent)
archeryCheck((EntityDamageByProjectileEvent) event);
@ -195,7 +197,8 @@ public class Combat {
{
Player master = Taming.getOwner(event.getEntity(), pluginx);
PlayerProfile PPo = Users.getProfile(master);
if(mcPermissions.getInstance().taming(master))
{
/*
* TEMPORARY FIX AS WOLVES AREN'T TRIGGERING DAMAGE EVENTS WHEN ATTACKING NON PLAYERS AT THE TIME OF WRITING
*/
@ -216,6 +219,7 @@ public class Combat {
}
}
}
}
public static void combatAbilityChecks(Player attacker, PlayerProfile PPa, Plugin pluginx)
{

View File

@ -50,6 +50,15 @@ public class mcEntityListener extends EntityListener {
public void onEntityDamage(EntityDamageEvent event) {
if(event.isCancelled())
return;
/*
* CHECK FOR mcMMO PVP FLAG
*/
if(event instanceof EntityDamageByEntityEvent)
{
EntityDamageByEntityEvent eventb = (EntityDamageByEntityEvent)event;
if(eventb.getEntity() instanceof Player && eventb.getDamager() instanceof Player && !LoadProperties.pvp)
return;
}
/*
* CHECK FOR INVULNERABILITY
*/

View File

@ -1,3 +1,3 @@
name: mcMMO
main: com.gmail.nossr50.mcMMO
version: 1.0.04
version: 1.0.05