This commit is contained in:
nossr50 2011-02-26 18:07:08 -08:00
parent 4d09cab58d
commit b762e93340
4 changed files with 18 additions and 4 deletions

View File

@ -81,7 +81,7 @@ public class mcMMO extends JavaPlugin {
pm.registerEvent(Event.Type.PLAYER_QUIT, playerListener, Priority.Normal, this); pm.registerEvent(Event.Type.PLAYER_QUIT, playerListener, Priority.Normal, this);
pm.registerEvent(Event.Type.BLOCK_DAMAGED, blockListener, Priority.Normal, this); pm.registerEvent(Event.Type.BLOCK_DAMAGED, blockListener, Priority.Normal, this);
pm.registerEvent(Event.Type.PLAYER_CHAT, playerListener, Priority.Monitor, this); pm.registerEvent(Event.Type.PLAYER_CHAT, playerListener, Priority.Monitor, this);
pm.registerEvent(Event.Type.PLAYER_COMMAND_PREPROCESS, playerListener, Priority.Normal, this); pm.registerEvent(Event.Type.PLAYER_COMMAND_PREPROCESS, playerListener, Priority.High, this);
pm.registerEvent(Event.Type.ENTITY_DEATH, entityListener, Priority.Normal, this); pm.registerEvent(Event.Type.ENTITY_DEATH, entityListener, Priority.Normal, this);
pm.registerEvent(Event.Type.BLOCK_FLOW, blockListener, Priority.Normal, this); pm.registerEvent(Event.Type.BLOCK_FLOW, blockListener, Priority.Normal, this);
pm.registerEvent(Event.Type.BLOCK_PLACED, blockListener, Priority.Normal, this); pm.registerEvent(Event.Type.BLOCK_PLACED, blockListener, Priority.Normal, this);
@ -106,6 +106,20 @@ public class mcMMO extends JavaPlugin {
} }
} }
} }
public boolean isPartyChatToggled(Player player){
if(mcConfig.getInstance().isPartyToggled(player.getName())){
return true;
} else {
return false;
}
}
public boolean isAdminChatToggled(Player player){
if(mcConfig.getInstance().isAdminToggled(player.getName())){
return true;
} else {
return false;
}
}
public Permissions getPermissions() { public Permissions getPermissions() {
return permissions; return permissions;

View File

@ -113,7 +113,7 @@ public class mcPlayerListener extends PlayerListener {
mcm.getInstance().repairCheck(player, is, block); mcm.getInstance().repairCheck(player, is, block);
} }
} }
public void onPlayerCommandPreprocess(PlayerChatEvent event) { public void onPlayerCommandPreproccesss(PlayerChatEvent event){
Player player = event.getPlayer(); Player player = event.getPlayer();
String[] split = event.getMessage().split(" "); String[] split = event.getMessage().split(" ");
String playerName = player.getName(); String playerName = player.getName();

View File

@ -110,7 +110,7 @@ public class mcm {
for(Player x : plugin.getServer().getOnlinePlayers()){ for(Player x : plugin.getServer().getOnlinePlayers()){
if(x != null && damaged != null){ if(x != null && damaged != null){
CraftPlayer cp = (CraftPlayer)x; CraftPlayer cp = (CraftPlayer)x;
if(x.getEntityId() != damaged.getEntityId()) if(cp != null && x != null && damaged != null && x.getEntityId() != damaged.getEntityId())
cp.getHandle().a.b(new Packet38EntityStatus(damaged.getEntityId(), (byte)2)); cp.getHandle().a.b(new Packet38EntityStatus(damaged.getEntityId(), (byte)2));
} }
} }

View File

@ -1,3 +1,3 @@
name: mcMMO name: mcMMO
main: com.gmail.nossr50.mcMMO main: com.gmail.nossr50.mcMMO
version: 0.8.5 version: 0.8.6