mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-23 05:36:46 +01:00
0.5 Release
This commit is contained in:
parent
eb31822b22
commit
3e7f0faa34
@ -584,10 +584,11 @@ public class mcEntityListener extends EntityListener {
|
|||||||
player.sendMessage(ChatColor.YELLOW+"Acrobatics skill increased by 2. Total ("+mcUsers.getProfile(player).getAcrobatics()+")");
|
player.sendMessage(ChatColor.YELLOW+"Acrobatics skill increased by 2. Total ("+mcUsers.getProfile(player).getAcrobatics()+")");
|
||||||
}
|
}
|
||||||
if(event.getDamage() >= 19){
|
if(event.getDamage() >= 19){
|
||||||
mcUsers.getProfile(player).skillUpAcrobatics(6);
|
mcUsers.getProfile(player).skillUpAcrobatics(3);
|
||||||
player.sendMessage(ChatColor.YELLOW+"Acrobatics skill increased by 6. Total ("+mcUsers.getProfile(player).getAcrobatics()+")");
|
player.sendMessage(ChatColor.YELLOW+"Acrobatics skill increased by 3. Total ("+mcUsers.getProfile(player).getAcrobatics()+")");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
mcConfig.getInstance().addBlockWatch(loc.getWorld().getBlockAt(xx, y, z));
|
||||||
if(player.getHealth() - event.getDamage() <= 0){
|
if(player.getHealth() - event.getDamage() <= 0){
|
||||||
if(mcUsers.getProfile(player).isDead())
|
if(mcUsers.getProfile(player).isDead())
|
||||||
return;
|
return;
|
||||||
@ -596,7 +597,6 @@ public class mcEntityListener extends EntityListener {
|
|||||||
bidoof.sendMessage(ChatColor.GRAY+player.getName()+" has "+ChatColor.DARK_RED+"fallen "+ChatColor.GRAY+"to death.");
|
bidoof.sendMessage(ChatColor.GRAY+player.getName()+" has "+ChatColor.DARK_RED+"fallen "+ChatColor.GRAY+"to death.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mcConfig.getInstance().addBlockWatch(loc.getWorld().getBlockAt(xx, y, z));
|
|
||||||
}
|
}
|
||||||
if(type == DamageCause.DROWNING){
|
if(type == DamageCause.DROWNING){
|
||||||
if(mcUsers.getProfile(player).isDead())
|
if(mcUsers.getProfile(player).isDead())
|
||||||
@ -618,6 +618,16 @@ public class mcEntityListener extends EntityListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(type == DamageCause.LAVA){
|
||||||
|
if(mcUsers.getProfile(player).isDead())
|
||||||
|
return;
|
||||||
|
if(player.getHealth() - event.getDamage() <= 0){
|
||||||
|
mcUsers.getProfile(player).setDead(true);
|
||||||
|
for(Player slipslap : plugin.getServer().getOnlinePlayers()){
|
||||||
|
slipslap.sendMessage(ChatColor.GRAY+player.getName()+" has "+ChatColor.RED+"melted "+ChatColor.GRAY+".");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void onEntityDeath(EntityDeathEvent event) {
|
public void onEntityDeath(EntityDeathEvent event) {
|
||||||
@ -625,10 +635,11 @@ public class mcEntityListener extends EntityListener {
|
|||||||
if(x instanceof Player){
|
if(x instanceof Player){
|
||||||
Player player = (Player)x;
|
Player player = (Player)x;
|
||||||
if(mcUsers.getProfile(player).isDead()){
|
if(mcUsers.getProfile(player).isDead()){
|
||||||
return;
|
mcUsers.getProfile(player).setDead(false);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
for(Player derp : plugin.getServer().getOnlinePlayers()){
|
for(Player derp : plugin.getServer().getOnlinePlayers()){
|
||||||
derp.sendMessage(ChatColor.GRAY+player.getName()+" has died.");
|
derp.sendMessage(ChatColor.GRAY+player.getName()+" has died.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
package com.bukkit.nossr50.mcMMO;
|
package com.bukkit.nossr50.mcMMO;
|
||||||
|
|
||||||
|
import java.util.logging.Level;
|
||||||
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
@ -15,6 +18,7 @@ import org.bukkit.inventory.ItemStack;
|
|||||||
import com.nijikokun.bukkit.Permissions.Permissions;
|
import com.nijikokun.bukkit.Permissions.Permissions;
|
||||||
|
|
||||||
public class mcPlayerListener extends PlayerListener {
|
public class mcPlayerListener extends PlayerListener {
|
||||||
|
protected static final Logger log = Logger.getLogger("Minecraft");
|
||||||
public Location spawn = null;
|
public Location spawn = null;
|
||||||
private mcMMO plugin;
|
private mcMMO plugin;
|
||||||
|
|
||||||
@ -196,6 +200,30 @@ public class mcPlayerListener extends PlayerListener {
|
|||||||
player.sendMessage(ChatColor.GRAY+"Double Drops start to happen at 10 woodcutting skill");
|
player.sendMessage(ChatColor.GRAY+"Double Drops start to happen at 10 woodcutting skill");
|
||||||
player.sendMessage(ChatColor.GRAY+"and it gets more frequent from there.");
|
player.sendMessage(ChatColor.GRAY+"and it gets more frequent from there.");
|
||||||
}
|
}
|
||||||
|
if(split[0].equalsIgnoreCase("/archery")){
|
||||||
|
event.setCancelled(true);
|
||||||
|
player.sendMessage(ChatColor.GREEN+"~~ARCHERY INFO~~");
|
||||||
|
player.sendMessage(ChatColor.GREEN+"Gaining Skill: "+ChatColor.DARK_GRAY+"Shooting monsters.");
|
||||||
|
player.sendMessage(ChatColor.GREEN+"~~EFFECTS~~");
|
||||||
|
player.sendMessage(ChatColor.GRAY+"Damage scales with Archery skill");
|
||||||
|
player.sendMessage(ChatColor.GRAY+"Chance to daze player opponents with high skill lvl");
|
||||||
|
}
|
||||||
|
if(split[0].equalsIgnoreCase("/swords")){
|
||||||
|
event.setCancelled(true);
|
||||||
|
player.sendMessage(ChatColor.GREEN+"~~SWORDS INFO~~");
|
||||||
|
player.sendMessage(ChatColor.GREEN+"Gaining Skill: "+ChatColor.DARK_GRAY+"Slicing up monsters");
|
||||||
|
player.sendMessage(ChatColor.GREEN+"~~EFFECTS~~");
|
||||||
|
player.sendMessage(ChatColor.GRAY+"Parrying. It negates damage.");
|
||||||
|
player.sendMessage(ChatColor.GRAY+"Chance to parry scales with skill.");
|
||||||
|
}
|
||||||
|
if(split[0].equalsIgnoreCase("/acrobatics")){
|
||||||
|
event.setCancelled(true);
|
||||||
|
player.sendMessage(ChatColor.GREEN+"~~ACROBATICS INFO~~");
|
||||||
|
player.sendMessage(ChatColor.GREEN+"Gaining Skill: "+ChatColor.DARK_GRAY+"Spraining ankles.");
|
||||||
|
player.sendMessage(ChatColor.GREEN+"~~EFFECTS~~");
|
||||||
|
player.sendMessage(ChatColor.GRAY+"Rolling. Negates fall damage.");
|
||||||
|
player.sendMessage(ChatColor.GRAY+"Chance to roll scales with skill.");
|
||||||
|
}
|
||||||
if(split[0].equalsIgnoreCase("/mining")){
|
if(split[0].equalsIgnoreCase("/mining")){
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
player.sendMessage(ChatColor.GREEN+"~~MINING INFO~~");
|
player.sendMessage(ChatColor.GREEN+"~~MINING INFO~~");
|
||||||
@ -279,6 +307,9 @@ public class mcPlayerListener extends PlayerListener {
|
|||||||
player.sendMessage(ChatColor.GRAY+"/unarmed - displays info about the skill");
|
player.sendMessage(ChatColor.GRAY+"/unarmed - displays info about the skill");
|
||||||
player.sendMessage(ChatColor.GRAY+"/herbalism - displays info about the skill");
|
player.sendMessage(ChatColor.GRAY+"/herbalism - displays info about the skill");
|
||||||
player.sendMessage(ChatColor.GRAY+"/excavation - displays info about the skill");
|
player.sendMessage(ChatColor.GRAY+"/excavation - displays info about the skill");
|
||||||
|
player.sendMessage(ChatColor.GRAY+"/archery - displays info about the skill");
|
||||||
|
player.sendMessage(ChatColor.GRAY+"/swords - displays info about the skill");
|
||||||
|
player.sendMessage(ChatColor.GRAY+"/acrobatics - displays info about the skill");
|
||||||
}
|
}
|
||||||
if(mcUsers.getProfile(player).inParty() && split[0].equalsIgnoreCase("/ptp")){
|
if(mcUsers.getProfile(player).inParty() && split[0].equalsIgnoreCase("/ptp")){
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
@ -327,7 +358,7 @@ public class mcPlayerListener extends PlayerListener {
|
|||||||
player.sendMessage("Excavation Skill: "+mcUsers.getProfile(target).getExcavation());
|
player.sendMessage("Excavation Skill: "+mcUsers.getProfile(target).getExcavation());
|
||||||
player.sendMessage("Archery Skill: "+mcUsers.getProfile(target).getArchery());
|
player.sendMessage("Archery Skill: "+mcUsers.getProfile(target).getArchery());
|
||||||
player.sendMessage("Swords Skill: "+mcUsers.getProfile(target).getSwords());
|
player.sendMessage("Swords Skill: "+mcUsers.getProfile(target).getSwords());
|
||||||
player.sendMessage("Axes Skill: "+mcUsers.getProfile(target).getAxes());
|
//player.sendMessage("Axes Skill: "+mcUsers.getProfile(target).getAxes());
|
||||||
player.sendMessage("Acrobatics Skill: "+mcUsers.getProfile(target).getAcrobatics());
|
player.sendMessage("Acrobatics Skill: "+mcUsers.getProfile(target).getAcrobatics());
|
||||||
player.sendMessage(ChatColor.GREEN+"~~COORDINATES~~");
|
player.sendMessage(ChatColor.GREEN+"~~COORDINATES~~");
|
||||||
player.sendMessage("X: "+x);
|
player.sendMessage("X: "+x);
|
||||||
@ -358,7 +389,7 @@ public class mcPlayerListener extends PlayerListener {
|
|||||||
player.sendMessage(ChatColor.DARK_GREEN + "Excavation Skill: " + mcUsers.getProfile(player).getExcavation());
|
player.sendMessage(ChatColor.DARK_GREEN + "Excavation Skill: " + mcUsers.getProfile(player).getExcavation());
|
||||||
player.sendMessage(ChatColor.DARK_GREEN + "Archery Skill: " + mcUsers.getProfile(player).getArchery());
|
player.sendMessage(ChatColor.DARK_GREEN + "Archery Skill: " + mcUsers.getProfile(player).getArchery());
|
||||||
player.sendMessage(ChatColor.DARK_GREEN + "Swords Skill: " + mcUsers.getProfile(player).getSwords());
|
player.sendMessage(ChatColor.DARK_GREEN + "Swords Skill: " + mcUsers.getProfile(player).getSwords());
|
||||||
player.sendMessage(ChatColor.DARK_GREEN + "Axes Skill: " + mcUsers.getProfile(player).getAxes());
|
//player.sendMessage(ChatColor.DARK_GREEN + "Axes Skill: " + mcUsers.getProfile(player).getAxes());
|
||||||
player.sendMessage(ChatColor.DARK_GREEN + "Acrobatics Skill: " + mcUsers.getProfile(player).getAcrobatics());
|
player.sendMessage(ChatColor.DARK_GREEN + "Acrobatics Skill: " + mcUsers.getProfile(player).getAcrobatics());
|
||||||
}
|
}
|
||||||
//Party command
|
//Party command
|
||||||
@ -452,10 +483,6 @@ public class mcPlayerListener extends PlayerListener {
|
|||||||
public void onItemHeldChange(PlayerItemHeldEvent event) {
|
public void onItemHeldChange(PlayerItemHeldEvent event) {
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
}
|
}
|
||||||
private Block getBlockAt(int x, int y, int z) {
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
public void onPlayerChat(PlayerChatEvent event) {
|
public void onPlayerChat(PlayerChatEvent event) {
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
String[] split = event.getMessage().split(" ");
|
String[] split = event.getMessage().split(" ");
|
||||||
@ -463,6 +490,7 @@ public class mcPlayerListener extends PlayerListener {
|
|||||||
String y = ChatColor.AQUA + "{" + ChatColor.WHITE + player.getName() + ChatColor.AQUA + "} ";
|
String y = ChatColor.AQUA + "{" + ChatColor.WHITE + player.getName() + ChatColor.AQUA + "} ";
|
||||||
if(mcConfig.getInstance().isPartyToggled(player.getName())){
|
if(mcConfig.getInstance().isPartyToggled(player.getName())){
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
|
log.log(Level.INFO, "[P]("+mcUsers.getProfile(player).getParty()+")"+"<"+player.getName()+"> "+event.getMessage());
|
||||||
for(Player herp : plugin.getServer().getOnlinePlayers()){
|
for(Player herp : plugin.getServer().getOnlinePlayers()){
|
||||||
if(mcUsers.getProfile(herp).inParty()){
|
if(mcUsers.getProfile(herp).inParty()){
|
||||||
if(mcm.getInstance().inSameParty(herp, player)){
|
if(mcm.getInstance().inSameParty(herp, player)){
|
||||||
@ -473,6 +501,7 @@ public class mcPlayerListener extends PlayerListener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if((player.isOp() || mcPermissions.getInstance().adminChat(player)) && mcConfig.getInstance().isAdminToggled(player.getName())){
|
if((player.isOp() || mcPermissions.getInstance().adminChat(player)) && mcConfig.getInstance().isAdminToggled(player.getName())){
|
||||||
|
log.log(Level.INFO, "[A]"+"<"+player.getName()+"> "+event.getMessage());
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
for(Player herp : plugin.getServer().getOnlinePlayers()){
|
for(Player herp : plugin.getServer().getOnlinePlayers()){
|
||||||
if(herp.isOp()){
|
if(herp.isOp()){
|
||||||
|
Loading…
Reference in New Issue
Block a user