mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 15:16:45 +01:00
Small changes, mostly adding the ability to use /mmoedit and /addxp from console due to request.
This commit is contained in:
parent
ed0f8d7553
commit
ddcfc02924
@ -1,5 +1,8 @@
|
|||||||
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 1.1.17
|
||||||
|
/mmoedit and /addxp are useable from the console now
|
||||||
|
|
||||||
Version 1.1.16
|
Version 1.1.16
|
||||||
Added Melons to Herbalism xp tables
|
Added Melons to Herbalism xp tables
|
||||||
Endermen added to Combat skill xp tables
|
Endermen added to Combat skill xp tables
|
||||||
|
@ -879,7 +879,8 @@ public class Commands
|
|||||||
}
|
}
|
||||||
else if(LoadProperties.mmoeditEnable && mcPermissions.permissionsEnabled && label.equalsIgnoreCase(""+LoadProperties.mmoedit))
|
else if(LoadProperties.mmoeditEnable && mcPermissions.permissionsEnabled && label.equalsIgnoreCase(""+LoadProperties.mmoedit))
|
||||||
{
|
{
|
||||||
|
if(sender instanceof Player)
|
||||||
|
{
|
||||||
if(!mcPermissions.getInstance().mmoedit(player))
|
if(!mcPermissions.getInstance().mmoedit(player))
|
||||||
{
|
{
|
||||||
player.sendMessage(ChatColor.YELLOW+"[mcMMO] "+ChatColor.DARK_RED +mcLocale.getString("mcPlayerListener.NoPermission"));
|
player.sendMessage(ChatColor.YELLOW+"[mcMMO] "+ChatColor.DARK_RED +mcLocale.getString("mcPlayerListener.NoPermission"));
|
||||||
@ -911,12 +912,35 @@ public class Commands
|
|||||||
{
|
{
|
||||||
player.sendMessage(ChatColor.RED+"Usage is /"+LoadProperties.mmoedit+" playername skillname newvalue");
|
player.sendMessage(ChatColor.RED+"Usage is /"+LoadProperties.mmoedit+" playername skillname newvalue");
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
//If they do it wrong, inform them
|
||||||
|
if(split.length < 3)
|
||||||
|
{
|
||||||
|
System.out.println("Usage is /"+LoadProperties.mmoedit+" playername skillname newvalue");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else if(split.length == 4)
|
||||||
|
{
|
||||||
|
if(isPlayer(split[1]) && m.isInt(split[3]) && Skills.isSkill(split[2]))
|
||||||
|
{
|
||||||
|
int newvalue = Integer.valueOf(split[3]);
|
||||||
|
Users.getProfile(getPlayer(split[1])).modifyskill(Skills.getSkillType(split[2]), newvalue);
|
||||||
|
System.out.println(split[2]+" has been modified for "+getPlayer(split[1]).getName()+".");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
System.out.println("Usage is /"+LoadProperties.mmoedit+" playername skillname newvalue");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* ADD EXPERIENCE COMMAND
|
* ADD EXPERIENCE COMMAND
|
||||||
*/
|
*/
|
||||||
else if(LoadProperties.addxpEnable && mcPermissions.permissionsEnabled && label.equalsIgnoreCase(LoadProperties.addxp)){
|
else if(LoadProperties.addxpEnable && mcPermissions.permissionsEnabled && label.equalsIgnoreCase(LoadProperties.addxp))
|
||||||
|
{
|
||||||
|
if(sender instanceof Player)
|
||||||
|
{
|
||||||
if(!mcPermissions.getInstance().mmoedit(player)){
|
if(!mcPermissions.getInstance().mmoedit(player)){
|
||||||
player.sendMessage(ChatColor.YELLOW+"[mcMMO] "+ChatColor.DARK_RED +mcLocale.getString("mcPlayerListener.NoPermission"));
|
player.sendMessage(ChatColor.YELLOW+"[mcMMO] "+ChatColor.DARK_RED +mcLocale.getString("mcPlayerListener.NoPermission"));
|
||||||
return true;
|
return true;
|
||||||
@ -943,6 +967,25 @@ public class Commands
|
|||||||
} else {
|
} else {
|
||||||
player.sendMessage(ChatColor.RED+"Usage is /"+LoadProperties.addxp+" playername skillname xp");
|
player.sendMessage(ChatColor.RED+"Usage is /"+LoadProperties.addxp+" playername skillname xp");
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if(split.length < 3)
|
||||||
|
{
|
||||||
|
System.out.println("Usage is /"+LoadProperties.addxp+" playername skillname xp");
|
||||||
|
return true;
|
||||||
|
} else if(split.length == 4)
|
||||||
|
{
|
||||||
|
if(isPlayer(split[1]) && m.isInt(split[3]) && Skills.isSkill(split[2]))
|
||||||
|
{
|
||||||
|
int newvalue = Integer.valueOf(split[3]);
|
||||||
|
Users.getProfile(getPlayer(split[1])).addXP(Skills.getSkillType(split[2]), newvalue);
|
||||||
|
getPlayer(split[1]).sendMessage(ChatColor.GREEN+"Experience granted!");
|
||||||
|
System.out.println(split[2]+" has been modified for "+getPlayer(split[1]).getName()+".");
|
||||||
|
Skills.XpCheckAll(getPlayer(split[1]));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
System.out.println("Usage is /"+LoadProperties.addxp+" playername skillname xp");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if(LoadProperties.ptpEnable && label.equalsIgnoreCase(LoadProperties.ptp) && PP.inParty())
|
else if(LoadProperties.ptpEnable && label.equalsIgnoreCase(LoadProperties.ptp) && PP.inParty())
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
name: mcMMO
|
name: mcMMO
|
||||||
main: com.gmail.nossr50.mcMMO
|
main: com.gmail.nossr50.mcMMO
|
||||||
version: 1.1.16
|
version: 1.1.17 ALPHA WIP #1
|
||||||
softdepend: [Spout]
|
softdepend: [Spout]
|
||||||
commands:
|
commands:
|
||||||
mchud:
|
mchud:
|
||||||
|
Loading…
Reference in New Issue
Block a user