mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
All changes up to 0.9.16
This commit is contained in:
parent
7782c3c03c
commit
04b233c861
@ -1,7 +1,14 @@
|
|||||||
Changelog:
|
Changelog:
|
||||||
#Versions without changelogs probably had very small misc fixes, like tweaks to the source code#
|
#Versions without changelogs probably had very small misc fixes, like tweaks to the source code#
|
||||||
|
Version 0.9.16
|
||||||
|
Logs placed by the player won't grant XP/Double Drops anymore
|
||||||
|
Added more functions plugin authors can call
|
||||||
|
Acrobatics roll has a damage threshold of 20, going above this means a failed Roll
|
||||||
|
|
||||||
|
|
||||||
Version 0.9.15
|
Version 0.9.15
|
||||||
AoE Abilities will only hit wolves attacking you
|
Acrobatics will now behave properly
|
||||||
|
AoE Abilities ignore wolves (temp fix)
|
||||||
Added "all" parameter to /mmoedit & /addxp
|
Added "all" parameter to /mmoedit & /addxp
|
||||||
After giving XP to a player it will now check for level ups in skills
|
After giving XP to a player it will now check for level ups in skills
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@ import org.bukkit.Location;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.entity.EntityDamageEvent;
|
import org.bukkit.event.entity.EntityDamageEvent;
|
||||||
|
|
||||||
|
|
||||||
public class mcAcrobatics {
|
public class mcAcrobatics {
|
||||||
private static volatile mcAcrobatics instance;
|
private static volatile mcAcrobatics instance;
|
||||||
public static mcAcrobatics getInstance() {
|
public static mcAcrobatics getInstance() {
|
||||||
@ -13,7 +14,7 @@ public class mcAcrobatics {
|
|||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
public void acrobaticsCheck(Player player, EntityDamageEvent event, Location loc, int xx, int y, int z){
|
public void acrobaticsCheck(Player player, EntityDamageEvent event, Location loc, int xx, int y, int z){
|
||||||
if(player != null && mcPermissions.getInstance().acrobatics(player)){
|
if(player != null && mcPermissions.getInstance().acrobatics(player)&& event.getDamage() < 21){
|
||||||
if(Math.random() * 1000 <= mcUsers.getProfile(player).getAcrobaticsInt()){
|
if(Math.random() * 1000 <= mcUsers.getProfile(player).getAcrobaticsInt()){
|
||||||
player.sendMessage("**ROLLED**");
|
player.sendMessage("**ROLLED**");
|
||||||
if(!mcConfig.getInstance().isBlockWatched(loc.getWorld().getBlockAt(xx, y, z))){
|
if(!mcConfig.getInstance().isBlockWatched(loc.getWorld().getBlockAt(xx, y, z))){
|
||||||
|
@ -12,6 +12,7 @@ import org.bukkit.event.block.BlockListener;
|
|||||||
import org.bukkit.event.block.BlockPlaceEvent;
|
import org.bukkit.event.block.BlockPlaceEvent;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
|
|
||||||
public class mcBlockListener extends BlockListener {
|
public class mcBlockListener extends BlockListener {
|
||||||
private final mcMMO plugin;
|
private final mcMMO plugin;
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@ import org.bukkit.event.entity.EntityDamageByProjectileEvent;
|
|||||||
import org.bukkit.event.entity.EntityDamageEvent;
|
import org.bukkit.event.entity.EntityDamageEvent;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
|
|
||||||
public class mcCombat {
|
public class mcCombat {
|
||||||
private static mcMMO plugin;
|
private static mcMMO plugin;
|
||||||
public mcCombat(mcMMO instance) {
|
public mcCombat(mcMMO instance) {
|
||||||
@ -514,13 +515,10 @@ public class mcCombat {
|
|||||||
target.damage(event.getDamage() / 2);
|
target.damage(event.getDamage() / 2);
|
||||||
targets--;
|
targets--;
|
||||||
}
|
}
|
||||||
|
if(derp instanceof Wolf){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if(derp instanceof Animals && targets >= 1){
|
if(derp instanceof Animals && targets >= 1){
|
||||||
if(derp instanceof Wolf){
|
|
||||||
if(((Wolf) derp).isAngry() && ((Wolf) derp).getTarget() != attacker){
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Animals target = (Animals)derp;
|
Animals target = (Animals)derp;
|
||||||
target.damage(event.getDamage() / 2);
|
target.damage(event.getDamage() / 2);
|
||||||
targets--;
|
targets--;
|
||||||
@ -551,9 +549,10 @@ public class mcCombat {
|
|||||||
target.damage(event.getDamage() / 4);
|
target.damage(event.getDamage() / 4);
|
||||||
targets--;
|
targets--;
|
||||||
}
|
}
|
||||||
|
if(derp instanceof Wolf){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if(derp instanceof Animals && targets >= 1){
|
if(derp instanceof Animals && targets >= 1){
|
||||||
if(derp instanceof Wolf)
|
|
||||||
continue;
|
|
||||||
if(!mcConfig.getInstance().isBleedTracked(derp))
|
if(!mcConfig.getInstance().isBleedTracked(derp))
|
||||||
mcConfig.getInstance().addToBleedQue(x);
|
mcConfig.getInstance().addToBleedQue(x);
|
||||||
Animals target = (Animals)derp;
|
Animals target = (Animals)derp;
|
||||||
|
@ -20,6 +20,7 @@ import org.bukkit.event.entity.EntityListener;
|
|||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
|
|
||||||
public class mcEntityListener extends EntityListener {
|
public class mcEntityListener extends EntityListener {
|
||||||
private final mcMMO plugin;
|
private final mcMMO plugin;
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@ import org.bukkit.block.Block;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
|
|
||||||
public class mcExcavation {
|
public class mcExcavation {
|
||||||
private static mcMMO plugin;
|
private static mcMMO plugin;
|
||||||
public mcExcavation(mcMMO instance) {
|
public mcExcavation(mcMMO instance) {
|
||||||
|
@ -7,6 +7,7 @@ import org.bukkit.block.Block;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
|
|
||||||
public class mcHerbalism {
|
public class mcHerbalism {
|
||||||
private static mcMMO plugin;
|
private static mcMMO plugin;
|
||||||
public mcHerbalism(mcMMO instance) {
|
public mcHerbalism(mcMMO instance) {
|
||||||
|
@ -6,6 +6,7 @@ import org.bukkit.block.Block;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
|
|
||||||
public class mcItem {
|
public class mcItem {
|
||||||
private static mcMMO plugin;
|
private static mcMMO plugin;
|
||||||
public mcItem(mcMMO instance) {
|
public mcItem(mcMMO instance) {
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
package com.gmail.nossr50;
|
package com.gmail.nossr50;
|
||||||
|
|
||||||
import com.nijikokun.bukkit.Permissions.Permissions;
|
import com.nijikokun.bukkit.Permissions.Permissions;
|
||||||
import com.nijiko.Messaging;
|
import com.nijiko.Messaging;
|
||||||
import com.nijiko.permissions.PermissionHandler;
|
import com.nijiko.permissions.PermissionHandler;
|
||||||
@ -24,7 +25,6 @@ public class mcMMO extends JavaPlugin {
|
|||||||
private final mcPlayerListener playerListener = new mcPlayerListener(this);
|
private final mcPlayerListener playerListener = new mcPlayerListener(this);
|
||||||
private final mcBlockListener blockListener = new mcBlockListener(this);
|
private final mcBlockListener blockListener = new mcBlockListener(this);
|
||||||
private final mcEntityListener entityListener = new mcEntityListener(this);
|
private final mcEntityListener entityListener = new mcEntityListener(this);
|
||||||
//private final mcServerListener serverListener = new mcServerListener(this);
|
|
||||||
private final String name = "mcMMO";
|
private final String name = "mcMMO";
|
||||||
public static PermissionHandler PermissionsHandler = null;
|
public static PermissionHandler PermissionsHandler = null;
|
||||||
private Permissions permissions;
|
private Permissions permissions;
|
||||||
@ -32,9 +32,8 @@ public class mcMMO extends JavaPlugin {
|
|||||||
|
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
mcMMO_Timer.schedule(new mcTimer(this), 0, (long)(1000));
|
mcMMO_Timer.schedule(new mcTimer(this), 0, (long)(1000));
|
||||||
//Make the directory if it does not exist
|
|
||||||
new File(maindirectory).mkdir();
|
new File(maindirectory).mkdir();
|
||||||
//Make the file if it does not exist
|
|
||||||
if(!Properties.exists()){
|
if(!Properties.exists()){
|
||||||
try {
|
try {
|
||||||
Properties.createNewFile();
|
Properties.createNewFile();
|
||||||
@ -78,8 +77,6 @@ public class mcMMO extends JavaPlugin {
|
|||||||
pm.registerEvent(Event.Type.PLAYER_ITEM_HELD, playerListener, Priority.Normal, this);
|
pm.registerEvent(Event.Type.PLAYER_ITEM_HELD, playerListener, Priority.Normal, this);
|
||||||
pm.registerEvent(Event.Type.ENTITY_DAMAGE, entityListener, Priority.Highest, this);
|
pm.registerEvent(Event.Type.ENTITY_DAMAGE, entityListener, Priority.Highest, this);
|
||||||
|
|
||||||
//pm.registerEvent(Event.Type.CREATURE_SPAWN, entityListener, Priority.Normal, this);
|
|
||||||
//Displays a message when plugin is loaded
|
|
||||||
PluginDescriptionFile pdfFile = this.getDescription();
|
PluginDescriptionFile pdfFile = this.getDescription();
|
||||||
mcPermissions.initialize(getServer());
|
mcPermissions.initialize(getServer());
|
||||||
System.out.println( pdfFile.getName() + " version " + pdfFile.getVersion() + " is enabled!" );
|
System.out.println( pdfFile.getName() + " version " + pdfFile.getVersion() + " is enabled!" );
|
||||||
@ -94,7 +91,7 @@ public class mcMMO extends JavaPlugin {
|
|||||||
this.getServer().getPluginManager().disablePlugin(this);
|
this.getServer().getPluginManager().disablePlugin(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public boolean isPartyChatToggled(Player player){
|
public boolean isPartyChatToggled(Player player){
|
||||||
if(mcConfig.getInstance().isPartyToggled(player.getName())){
|
if(mcConfig.getInstance().isPartyToggled(player.getName())){
|
||||||
return true;
|
return true;
|
||||||
@ -113,6 +110,12 @@ public class mcMMO extends JavaPlugin {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public void addXp(Player player, String skillname, Integer newvalue){
|
||||||
|
mcUsers.getProfile(player).addXpToSkill(newvalue, skillname);
|
||||||
|
}
|
||||||
|
public void modifySkill(Player player, String skillname, Integer newvalue){
|
||||||
|
mcUsers.getProfile(player).modifyskill(newvalue, skillname);
|
||||||
|
}
|
||||||
public boolean isAdminChatToggled(Player player){
|
public boolean isAdminChatToggled(Player player){
|
||||||
if(mcConfig.getInstance().isAdminToggled(player.getName())){
|
if(mcConfig.getInstance().isAdminToggled(player.getName())){
|
||||||
return true;
|
return true;
|
||||||
|
@ -7,6 +7,7 @@ import org.bukkit.block.Block;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
|
|
||||||
public class mcMining {
|
public class mcMining {
|
||||||
private static mcMMO plugin;
|
private static mcMMO plugin;
|
||||||
public mcMining(mcMMO instance) {
|
public mcMining(mcMMO instance) {
|
||||||
|
@ -3,6 +3,7 @@ package com.gmail.nossr50;
|
|||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
|
||||||
public class mcParty {
|
public class mcParty {
|
||||||
private static mcMMO plugin;
|
private static mcMMO plugin;
|
||||||
public mcParty(mcMMO instance) {
|
public mcParty(mcMMO instance) {
|
||||||
|
@ -19,6 +19,7 @@ import org.bukkit.event.player.PlayerLoginEvent;
|
|||||||
import org.bukkit.event.player.PlayerRespawnEvent;
|
import org.bukkit.event.player.PlayerRespawnEvent;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
|
|
||||||
public class mcPlayerListener extends PlayerListener {
|
public class mcPlayerListener extends PlayerListener {
|
||||||
protected static final Logger log = Logger.getLogger("Minecraft");
|
protected static final Logger log = Logger.getLogger("Minecraft");
|
||||||
public Location spawn = null;
|
public Location spawn = null;
|
||||||
@ -241,7 +242,6 @@ public class mcPlayerListener extends PlayerListener {
|
|||||||
mcUsers.getProfile(getPlayer(split[1])).addXpToSkill(newvalue, split[2]);
|
mcUsers.getProfile(getPlayer(split[1])).addXpToSkill(newvalue, split[2]);
|
||||||
getPlayer(split[1]).sendMessage(ChatColor.GREEN+"Experience granted!");
|
getPlayer(split[1]).sendMessage(ChatColor.GREEN+"Experience granted!");
|
||||||
player.sendMessage(ChatColor.RED+split[2]+" has been modified.");
|
player.sendMessage(ChatColor.RED+split[2]+" has been modified.");
|
||||||
mcSkills.getInstance().XpCheck(getPlayer(split[1]));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(split.length == 3){
|
else if(split.length == 3){
|
||||||
@ -249,7 +249,6 @@ public class mcPlayerListener extends PlayerListener {
|
|||||||
int newvalue = Integer.valueOf(split[2]);
|
int newvalue = Integer.valueOf(split[2]);
|
||||||
mcUsers.getProfile(player).addXpToSkill(newvalue, split[1]);
|
mcUsers.getProfile(player).addXpToSkill(newvalue, split[1]);
|
||||||
player.sendMessage(ChatColor.RED+split[1]+" has been modified.");
|
player.sendMessage(ChatColor.RED+split[1]+" has been modified.");
|
||||||
mcSkills.getInstance().XpCheck(player);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
player.sendMessage(ChatColor.RED+"Usage is /"+mcLoadProperties.addxp+" playername skillname xp");
|
player.sendMessage(ChatColor.RED+"Usage is /"+mcLoadProperties.addxp+" playername skillname xp");
|
||||||
|
@ -5,6 +5,7 @@ import org.bukkit.block.Block;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
|
|
||||||
public class mcRepair {
|
public class mcRepair {
|
||||||
private static mcMMO plugin;
|
private static mcMMO plugin;
|
||||||
public mcRepair(mcMMO instance) {
|
public mcRepair(mcMMO instance) {
|
||||||
|
@ -6,6 +6,7 @@ import org.bukkit.entity.Entity;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
|
|
||||||
public class mcSkills {
|
public class mcSkills {
|
||||||
private static mcMMO plugin;
|
private static mcMMO plugin;
|
||||||
public mcSkills(mcMMO instance) {
|
public mcSkills(mcMMO instance) {
|
||||||
|
@ -5,6 +5,7 @@ import java.util.TimerTask;
|
|||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.entity.*;
|
import org.bukkit.entity.*;
|
||||||
|
|
||||||
|
|
||||||
public class mcTimer extends TimerTask{
|
public class mcTimer extends TimerTask{
|
||||||
private final mcMMO plugin;
|
private final mcMMO plugin;
|
||||||
int thecount = 1;
|
int thecount = 1;
|
||||||
|
@ -10,6 +10,7 @@ import org.bukkit.Location;
|
|||||||
import org.bukkit.entity.*;
|
import org.bukkit.entity.*;
|
||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
|
|
||||||
|
|
||||||
public class mcUsers {
|
public class mcUsers {
|
||||||
private static volatile mcUsers instance;
|
private static volatile mcUsers instance;
|
||||||
protected static final Logger log = Logger.getLogger("Minecraft");
|
protected static final Logger log = Logger.getLogger("Minecraft");
|
||||||
@ -1503,6 +1504,7 @@ class PlayerList
|
|||||||
axesgather = String.valueOf(Integer.valueOf(axesgather)+newvalue);
|
axesgather = String.valueOf(Integer.valueOf(axesgather)+newvalue);
|
||||||
}
|
}
|
||||||
save();
|
save();
|
||||||
|
mcSkills.getInstance().XpCheck(thisplayer);
|
||||||
}
|
}
|
||||||
public void modifyskill(int newvalue, String skillname){
|
public void modifyskill(int newvalue, String skillname){
|
||||||
if(skillname.toLowerCase().equals("mining")){
|
if(skillname.toLowerCase().equals("mining")){
|
||||||
|
@ -9,6 +9,7 @@ import org.bukkit.block.Block;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
|
|
||||||
public class mcWoodCutting {
|
public class mcWoodCutting {
|
||||||
int w = 0;
|
int w = 0;
|
||||||
private boolean isdone = false;
|
private boolean isdone = false;
|
||||||
|
@ -13,6 +13,7 @@ import org.bukkit.event.block.BlockBreakEvent;
|
|||||||
import org.bukkit.event.player.PlayerChatEvent;
|
import org.bukkit.event.player.PlayerChatEvent;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
|
|
||||||
public class mcm {
|
public class mcm {
|
||||||
/*
|
/*
|
||||||
* I'm storing my functions/methods in here in an unorganized manner. Spheal with it.
|
* I'm storing my functions/methods in here in an unorganized manner. Spheal with it.
|
||||||
@ -159,7 +160,7 @@ public class mcm {
|
|||||||
}
|
}
|
||||||
public boolean shouldBeWatched(Block block){
|
public boolean shouldBeWatched(Block block){
|
||||||
int id = block.getTypeId();
|
int id = block.getTypeId();
|
||||||
if(id == 42 || id == 87 || id == 89 || 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){
|
if(id == 17 || id == 42 || id == 87 || id == 89 || 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;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
name: mcMMO
|
name: mcMMO
|
||||||
main: com.gmail.nossr50.mcMMO
|
main: com.gmail.nossr50.mcMMO
|
||||||
version: 0.9.15
|
version: 0.9.16
|
Loading…
Reference in New Issue
Block a user