mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-29 16:46:46 +01:00
All changes up to 0.8.19
This commit is contained in:
parent
afa9abfb91
commit
393fa8dc1d
@ -1,5 +1,14 @@
|
||||
Changelog:
|
||||
#Versions without changelogs probably had very small misc fixes, like tweaks to the source code#
|
||||
Version 0.8.19
|
||||
Fixed being able to excavate placed blocks
|
||||
Added toggle option to mining requiring a pickaxe
|
||||
Added toggle option to woodcutting requiring an axe
|
||||
PVP interactions now reward XP based on the damage caused (this is effected by skills)
|
||||
PVP XP gain can be disabled in the configuration file
|
||||
PVP XP has a modifier, increase the modifier for higher XP rewards from PVP combat
|
||||
Version 0.8.18
|
||||
Fixed sandstone not being watched for exploitation
|
||||
Version 0.8.17
|
||||
mcmmo.users moved to plugins/mcMMO/
|
||||
Snowballs and Eggs will no longer trigger Ignition
|
||||
|
@ -54,14 +54,27 @@ public class mcBlockListener extends BlockListener {
|
||||
* MINING
|
||||
*/
|
||||
if(player != null && dmg == 2 && !mcConfig.getInstance().isBlockWatched(block)){
|
||||
if(mcm.getInstance().isMiningPick(inhand) && mcPermissions.getInstance().mining(player))
|
||||
if(mcPermissions.getInstance().mining(player)){
|
||||
if(mcLoadProperties.miningrequirespickaxe){
|
||||
if(mcm.getInstance().isMiningPick(inhand))
|
||||
mcMining.getInstance().miningBlockCheck(player, block);
|
||||
} else {
|
||||
mcMining.getInstance().miningBlockCheck(player, block);
|
||||
}
|
||||
}
|
||||
/*
|
||||
* WOOD CUTTING
|
||||
*/
|
||||
if(player != null && mcm.getInstance().isAxes(inhand) && block.getTypeId() == 17 && mcPermissions.getInstance().woodcutting(player)){
|
||||
if(player != null && block.getTypeId() == 17 && mcPermissions.getInstance().woodcutting(player)){
|
||||
if(mcLoadProperties.woodcuttingrequiresaxe){
|
||||
if(mcm.getInstance().isAxes(inhand)){
|
||||
mcWoodCutting.getInstance().woodCuttingProcCheck(player, block, loc);
|
||||
mcUsers.getProfile(player).addWoodcuttingGather(7);
|
||||
}
|
||||
} else {
|
||||
mcWoodCutting.getInstance().woodCuttingProcCheck(player, block, loc);
|
||||
mcUsers.getProfile(player).addWoodcuttingGather(7);
|
||||
}
|
||||
/*
|
||||
* IF PLAYER IS USING TREEFELLER
|
||||
*/
|
||||
|
@ -92,6 +92,47 @@ public class mcCombat {
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
* PVP XP
|
||||
*/
|
||||
if(attacker != null && defender != null && mcLoadProperties.pvpxp && !mcParty.getInstance().inSameParty(attacker, defender)){
|
||||
if(mcm.getInstance().isAxes(attacker.getItemInHand()))
|
||||
mcUsers.getProfile(attacker).addAxesGather((event.getDamage() * 3) * mcLoadProperties.pvpxprewardmodifier);
|
||||
if(mcm.getInstance().isSwords(attacker.getItemInHand()))
|
||||
mcUsers.getProfile(attacker).addSwordsGather((event.getDamage() * 3) * mcLoadProperties.pvpxprewardmodifier);
|
||||
if(attacker.getItemInHand().getTypeId() == 0)
|
||||
mcUsers.getProfile(attacker).addUnarmedGather((event.getDamage() * 3) * mcLoadProperties.pvpxprewardmodifier);
|
||||
}
|
||||
/*
|
||||
* CHECK FOR LEVEL UPS
|
||||
*/
|
||||
if(mcUsers.getProfile(attacker).getSwordsGatherInt() >= mcUsers.getProfile(attacker).getXpToLevel("swords")){
|
||||
int skillups = 0;
|
||||
while(mcUsers.getProfile(attacker).getSwordsGatherInt() >= mcUsers.getProfile(attacker).getXpToLevel("swords")){
|
||||
skillups++;
|
||||
mcUsers.getProfile(attacker).removeSwordsGather(mcUsers.getProfile(attacker).getXpToLevel("swords"));
|
||||
mcUsers.getProfile(attacker).skillUpSwords(1);
|
||||
}
|
||||
attacker.sendMessage(ChatColor.YELLOW+"Swords skill increased by "+skillups+"."+" Total ("+mcUsers.getProfile(attacker).getSwords()+")");
|
||||
}
|
||||
if(mcUsers.getProfile(attacker).getAxesGatherInt() >= mcUsers.getProfile(attacker).getXpToLevel("axes")){
|
||||
int skillups = 0;
|
||||
while(mcUsers.getProfile(attacker).getAxesGatherInt() >= mcUsers.getProfile(attacker).getXpToLevel("axes")){
|
||||
skillups++;
|
||||
mcUsers.getProfile(attacker).removeAxesGather(mcUsers.getProfile(attacker).getXpToLevel("axes"));
|
||||
mcUsers.getProfile(attacker).skillUpAxes(1);
|
||||
}
|
||||
attacker.sendMessage(ChatColor.YELLOW+"Axes skill increased by "+skillups+"."+" Total ("+mcUsers.getProfile(attacker).getAxes()+")");
|
||||
}
|
||||
if(mcUsers.getProfile(attacker).getUnarmedGatherInt() >= mcUsers.getProfile(attacker).getXpToLevel("unarmed")){
|
||||
int skillups = 0;
|
||||
while(mcUsers.getProfile(attacker).getUnarmedGatherInt() >= mcUsers.getProfile(attacker).getXpToLevel("unarmed")){
|
||||
skillups++;
|
||||
mcUsers.getProfile(attacker).removeUnarmedGather(mcUsers.getProfile(attacker).getXpToLevel("unarmed"));
|
||||
mcUsers.getProfile(attacker).skillUpUnarmed(1);
|
||||
}
|
||||
attacker.sendMessage(ChatColor.YELLOW+"Unarmed skill increased by "+skillups+"."+" Total ("+mcUsers.getProfile(attacker).getUnarmed()+")");
|
||||
}
|
||||
}
|
||||
}
|
||||
public void playerVersusSquidChecks(EntityDamageByEntityEvent event, Player attacker, Entity x, int type){
|
||||
@ -393,15 +434,6 @@ public class mcCombat {
|
||||
if(x instanceof PigZombie)
|
||||
mcUsers.getProfile(attacker).addArcheryGather(7);
|
||||
}
|
||||
if(mcUsers.getProfile(attacker).getArcheryGatherInt() >= mcUsers.getProfile(attacker).getXpToLevel("archery")){
|
||||
int skillups = 0;
|
||||
while(mcUsers.getProfile(attacker).getArcheryGatherInt() >= mcUsers.getProfile(attacker).getXpToLevel("archery")){
|
||||
skillups++;
|
||||
mcUsers.getProfile(attacker).removeArcheryGather(mcUsers.getProfile(attacker).getXpToLevel("archery"));
|
||||
mcUsers.getProfile(attacker).skillUpArchery(1);
|
||||
}
|
||||
attacker.sendMessage(ChatColor.YELLOW+"Archery skill increased by "+skillups+"."+" Total ("+mcUsers.getProfile(attacker).getArchery()+")");
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Defender is Animals
|
||||
@ -454,6 +486,12 @@ public class mcCombat {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* PVP XP
|
||||
*/
|
||||
if(mcLoadProperties.pvpxp && !mcParty.getInstance().inSameParty(attacker, defender)){
|
||||
mcUsers.getProfile(attacker).addArcheryGather((event.getDamage() * 3) * mcLoadProperties.pvpxprewardmodifier);
|
||||
}
|
||||
Location loc = defender.getLocation();
|
||||
if(Math.random() * 10 > 5){
|
||||
@ -490,6 +528,15 @@ public class mcCombat {
|
||||
event.setDamage(calculateDamage(event, 5));
|
||||
}
|
||||
}
|
||||
if(mcUsers.getProfile(attacker).getArcheryGatherInt() >= mcUsers.getProfile(attacker).getXpToLevel("archery")){
|
||||
int skillups = 0;
|
||||
while(mcUsers.getProfile(attacker).getArcheryGatherInt() >= mcUsers.getProfile(attacker).getXpToLevel("archery")){
|
||||
skillups++;
|
||||
mcUsers.getProfile(attacker).removeArcheryGather(mcUsers.getProfile(attacker).getXpToLevel("archery"));
|
||||
mcUsers.getProfile(attacker).skillUpArchery(1);
|
||||
}
|
||||
attacker.sendMessage(ChatColor.YELLOW+"Archery skill increased by "+skillups+"."+" Total ("+mcUsers.getProfile(attacker).getArchery()+")");
|
||||
}
|
||||
}
|
||||
}
|
||||
public boolean simulateUnarmedProc(Player player){
|
||||
|
@ -1,15 +1,19 @@
|
||||
package com.gmail.nossr50;
|
||||
|
||||
public class mcLoadProperties {
|
||||
public static Boolean pvp, eggs, apples, myspawnclearsinventory, cake, music, diamond, glowstone, slowsand, sulphur, netherrack, bones, coal, clay, anvilmessages;
|
||||
public static Boolean pvpxp, miningrequirespickaxe, woodcuttingrequiresaxe, pvp, eggs, apples, myspawnclearsinventory, cake, music, diamond, glowstone, slowsand, sulphur, netherrack, bones, coal, clay, anvilmessages;
|
||||
public static String mcmmo, mcc, mcgod, stats, mmoedit, ptp, party, myspawn, setmyspawn, whois, invite, accept, clearmyspawn;
|
||||
public static int repairdiamondlevel, globalxpmodifier, miningxpmodifier, repairxpmodifier, woodcuttingxpmodifier, unarmedxpmodifier, herbalismxpmodifier, excavationxpmodifier, archeryxpmodifier, swordsxpmodifier, axesxpmodifier, acrobaticsxpmodifier;
|
||||
public static int pvpxprewardmodifier, repairdiamondlevel, globalxpmodifier, miningxpmodifier, repairxpmodifier, woodcuttingxpmodifier, unarmedxpmodifier, herbalismxpmodifier, excavationxpmodifier, archeryxpmodifier, swordsxpmodifier, axesxpmodifier, acrobaticsxpmodifier;
|
||||
|
||||
public static void loadMain(){
|
||||
String propertiesFile = mcMMO.maindirectory + "mcmmo.properties";
|
||||
mcProperties properties = new mcProperties(propertiesFile);
|
||||
properties.load();
|
||||
|
||||
pvpxp = properties.getBoolean("pvpGivesXP", true);
|
||||
pvpxprewardmodifier = properties.getInteger("pvpXpRewardModifier", 1);
|
||||
miningrequirespickaxe = properties.getBoolean("miningRequiresPickaxe", true);
|
||||
woodcuttingrequiresaxe = properties.getBoolean("woodcuttingRequiresAxe", true);
|
||||
repairdiamondlevel = properties.getInteger("repairdiamondlevel", 50);
|
||||
/*
|
||||
* EXPERIENCE RATE MODIFIER
|
||||
|
@ -94,7 +94,7 @@ public class mcm {
|
||||
}
|
||||
public boolean shouldBeWatched(Block block){
|
||||
int id = block.getTypeId();
|
||||
if(id == 21 || id == 15 || id == 14 || id == 56 || id == 38 || id == 37 || id == 39 || id == 40){
|
||||
if(id == 2 || id == 3 || id == 12 || id == 13 || id == 21 || id == 15 || id == 14 || id == 56 || id == 38 || id == 37 || id == 39 || id == 40 || id == 24){
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
@ -1,3 +1,3 @@
|
||||
name: mcMMO
|
||||
main: com.gmail.nossr50.mcMMO
|
||||
version: 0.8.17
|
||||
version: 0.8.19
|
Loading…
Reference in New Issue
Block a user