mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 23:26:45 +01:00
Merge branch 'master' of github.com:mcMMO-Dev/mcMMO
Conflicts: Changelog.txt
This commit is contained in:
commit
4e6cc5ffa0
@ -10,13 +10,14 @@ Key:
|
|||||||
Version 1.3.06-dev
|
Version 1.3.06-dev
|
||||||
+ Added permissions check to skill functions
|
+ Added permissions check to skill functions
|
||||||
+ Added API functions for obtaining offline profiles & profiles via player names
|
+ Added API functions for obtaining offline profiles & profiles via player names
|
||||||
+ Changed Archery's Daze to deal 4 DMG on proc (2 Hearts)
|
|
||||||
+ Changed /addlevel command to work for offline users
|
|
||||||
= Fixed mmoupdate not being useable from console
|
= Fixed mmoupdate not being useable from console
|
||||||
|
= Fixed bug with repairing wooden tools
|
||||||
! Changed mcremove to no longer kick players when they are removed from database
|
! Changed mcremove to no longer kick players when they are removed from database
|
||||||
! Changed mcremove to work on offline users for FlatFile
|
! Changed mcremove to work on offline users for FlatFile
|
||||||
! Changed PlayerProfile constructor to always take a boolean
|
! Changed PlayerProfile constructor to always take a boolean
|
||||||
! Changed getPlayerProfile function to work for online & offline users
|
! Changed getPlayerProfile function to work for online & offline users
|
||||||
|
! Changed Archery's Daze to deal 4 DMG on proc (2 Hearts)
|
||||||
|
! Changed /addlevel command to work for offline users
|
||||||
|
|
||||||
Version 1.3.05
|
Version 1.3.05
|
||||||
+ Added Skill Shot to Archery which increases damage dealt by 10% every 50 skill levels (caps at 200%)
|
+ Added Skill Shot to Archery which increases damage dealt by 10% every 50 skill levels (caps at 200%)
|
||||||
|
@ -11,6 +11,7 @@ import com.gmail.nossr50.datatypes.PlayerProfile;
|
|||||||
import com.gmail.nossr50.locale.mcLocale;
|
import com.gmail.nossr50.locale.mcLocale;
|
||||||
|
|
||||||
public class McabilityCommand implements CommandExecutor {
|
public class McabilityCommand implements CommandExecutor {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
if (CommandHelper.noConsoleUsage(sender)) {
|
if (CommandHelper.noConsoleUsage(sender)) {
|
||||||
|
@ -7,14 +7,15 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import com.gmail.nossr50.mcPermissions;
|
import com.gmail.nossr50.mcPermissions;
|
||||||
|
import com.gmail.nossr50.commands.CommandHelper;
|
||||||
import com.gmail.nossr50.locale.mcLocale;
|
import com.gmail.nossr50.locale.mcLocale;
|
||||||
|
|
||||||
|
//TODO: Rework this whole thing. It's ugly.
|
||||||
public class MccCommand implements CommandExecutor {
|
public class MccCommand implements CommandExecutor {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
if (CommandHelper.noConsoleUsage(sender)) {
|
||||||
if (!(sender instanceof Player)) {
|
|
||||||
sender.sendMessage("This command does not support console useage.");
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -27,33 +28,41 @@ public class MccCommand implements CommandExecutor {
|
|||||||
player.sendMessage("/party " + mcLocale.getString("m.mccParty"));
|
player.sendMessage("/party " + mcLocale.getString("m.mccParty"));
|
||||||
player.sendMessage("/party q " + mcLocale.getString("m.mccPartyQ"));
|
player.sendMessage("/party q " + mcLocale.getString("m.mccPartyQ"));
|
||||||
|
|
||||||
if (mcPermissions.getInstance().partyChat(player))
|
if (mcPermissions.getInstance().partyChat(player)) {
|
||||||
player.sendMessage("/p " + mcLocale.getString("m.mccPartyToggle"));
|
player.sendMessage("/p " + mcLocale.getString("m.mccPartyToggle"));
|
||||||
|
}
|
||||||
|
|
||||||
player.sendMessage("/invite " + mcLocale.getString("m.mccPartyInvite"));
|
player.sendMessage("/invite " + mcLocale.getString("m.mccPartyInvite"));
|
||||||
player.sendMessage("/invite " + mcLocale.getString("m.mccPartyAccept"));
|
player.sendMessage("/invite " + mcLocale.getString("m.mccPartyAccept"));
|
||||||
|
|
||||||
if (mcPermissions.getInstance().partyTeleport(player))
|
if (mcPermissions.getInstance().partyTeleport(player)) {
|
||||||
player.sendMessage("/ptp " + mcLocale.getString("m.mccPartyTeleport"));
|
player.sendMessage("/ptp " + mcLocale.getString("m.mccPartyTeleport"));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
player.sendMessage(mcLocale.getString("m.mccOtherCommands"));
|
player.sendMessage(mcLocale.getString("m.mccOtherCommands"));
|
||||||
player.sendMessage("/mcstats " + ChatColor.RED + mcLocale.getString("m.mccStats"));
|
player.sendMessage("/mcstats " + ChatColor.RED + mcLocale.getString("m.mccStats"));
|
||||||
player.sendMessage("/mctop <skillname> <page> " + ChatColor.RED + mcLocale.getString("m.mccLeaderboards"));
|
player.sendMessage("/mctop <skillname> <page> " + ChatColor.RED + mcLocale.getString("m.mccLeaderboards"));
|
||||||
|
|
||||||
if (mcPermissions.getInstance().mcAbility(player))
|
if (mcPermissions.getInstance().mcAbility(player)) {
|
||||||
player.sendMessage("/mcability " + ChatColor.RED + mcLocale.getString("m.mccToggleAbility"));
|
player.sendMessage("/mcability " + ChatColor.RED + mcLocale.getString("m.mccToggleAbility"));
|
||||||
|
}
|
||||||
|
|
||||||
if (mcPermissions.getInstance().adminChat(player))
|
if (mcPermissions.getInstance().adminChat(player)) {
|
||||||
player.sendMessage("/a " + ChatColor.RED + mcLocale.getString("m.mccAdminToggle"));
|
player.sendMessage("/a " + ChatColor.RED + mcLocale.getString("m.mccAdminToggle"));
|
||||||
|
}
|
||||||
|
|
||||||
if (mcPermissions.getInstance().inspect(player))
|
if (mcPermissions.getInstance().inspect(player)) {
|
||||||
player.sendMessage("/inspect " + mcLocale.getString("m.mccInspect"));
|
player.sendMessage("/inspect " + mcLocale.getString("m.mccInspect"));
|
||||||
|
}
|
||||||
|
|
||||||
if (mcPermissions.getInstance().mmoedit(player))
|
if (mcPermissions.getInstance().mmoedit(player)) {
|
||||||
player.sendMessage("/mmoedit " + mcLocale.getString("m.mccMmoedit"));
|
player.sendMessage("/mmoedit " + mcLocale.getString("m.mccMmoedit"));
|
||||||
|
}
|
||||||
|
|
||||||
if (mcPermissions.getInstance().mcgod(player))
|
if (mcPermissions.getInstance().mcgod(player)) {
|
||||||
player.sendMessage("/mcgod " + ChatColor.RED + mcLocale.getString("m.mccMcGod"));
|
player.sendMessage("/mcgod " + ChatColor.RED + mcLocale.getString("m.mccMcGod"));
|
||||||
|
}
|
||||||
|
|
||||||
player.sendMessage(mcLocale.getString("m.mccSkillInfo"));
|
player.sendMessage(mcLocale.getString("m.mccSkillInfo"));
|
||||||
player.sendMessage("/mcmmo " + mcLocale.getString("m.mccModDescription"));
|
player.sendMessage("/mcmmo " + mcLocale.getString("m.mccModDescription"));
|
||||||
|
@ -1,43 +1,38 @@
|
|||||||
package com.gmail.nossr50.commands.mc;
|
package com.gmail.nossr50.commands.mc;
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import com.gmail.nossr50.Users;
|
import com.gmail.nossr50.Users;
|
||||||
import com.gmail.nossr50.mcPermissions;
|
import com.gmail.nossr50.commands.CommandHelper;
|
||||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||||
import com.gmail.nossr50.locale.mcLocale;
|
import com.gmail.nossr50.locale.mcLocale;
|
||||||
|
|
||||||
public class McgodCommand implements CommandExecutor {
|
public class McgodCommand implements CommandExecutor {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
if (CommandHelper.noConsoleUsage(sender)) {
|
||||||
if (!(sender instanceof Player)) {
|
|
||||||
sender.sendMessage("This command does not support console useage."); //TODO: Needs more locale.
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Player player = (Player) sender;
|
if (CommandHelper.noCommandPermissions(sender, "mcmmo.tools.mcgod")) {
|
||||||
PlayerProfile PP = Users.getProfile(player);
|
|
||||||
|
|
||||||
if (!mcPermissions.getInstance().mcgod(player)) {
|
|
||||||
player.sendMessage(ChatColor.YELLOW + "[mcMMO] " + ChatColor.DARK_RED + mcLocale.getString("mcPlayerListener.NoPermission"));
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mcPermissions.getInstance().mcgod(player)) {
|
PlayerProfile PP = Users.getProfile((Player) sender);
|
||||||
|
|
||||||
if (PP.getGodMode()) {
|
if (PP.getGodMode()) {
|
||||||
player.sendMessage(mcLocale.getString("mcPlayerListener.GodModeDisabled"));
|
sender.sendMessage(mcLocale.getString("mcPlayerListener.GodModeDisabled"));
|
||||||
PP.toggleGodMode();
|
|
||||||
} else {
|
|
||||||
player.sendMessage(mcLocale.getString("mcPlayerListener.GodModeEnabled"));
|
|
||||||
PP.toggleGodMode();
|
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
sender.sendMessage(mcLocale.getString("mcPlayerListener.GodModeEnabled"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PP.toggleGodMode();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
package com.gmail.nossr50.commands.mc;
|
package com.gmail.nossr50.commands.mc;
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
|
import org.bukkit.Material;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
import org.getspout.spoutapi.player.SpoutPlayer;
|
import org.getspout.spoutapi.player.SpoutPlayer;
|
||||||
|
|
||||||
import com.gmail.nossr50.config.LoadProperties;
|
import com.gmail.nossr50.config.LoadProperties;
|
||||||
@ -14,28 +14,22 @@ public class McmmoCommand implements CommandExecutor {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||||
|
|
||||||
if (!(sender instanceof Player)) {
|
|
||||||
sender.sendMessage("This command does not support console useage."); //TODO: Needs more locale.
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
Player player = (Player) sender;
|
|
||||||
|
|
||||||
String description = mcLocale.getString("mcMMO.Description", new Object[] { "mcc" });
|
String description = mcLocale.getString("mcMMO.Description", new Object[] { "mcc" });
|
||||||
String[] mcSplit = description.split(",");
|
String[] mcSplit = description.split(",");
|
||||||
|
|
||||||
for (String x : mcSplit) {
|
for (String x : mcSplit) {
|
||||||
player.sendMessage(x);
|
sender.sendMessage(x);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LoadProperties.spoutEnabled && player instanceof SpoutPlayer) {
|
if (LoadProperties.donateMessage) {
|
||||||
SpoutPlayer sPlayer = (SpoutPlayer) player;
|
if (LoadProperties.spoutEnabled && sender instanceof SpoutPlayer) {
|
||||||
if (LoadProperties.donateMessage)
|
SpoutPlayer sPlayer = (SpoutPlayer) sender;
|
||||||
sPlayer.sendMessage(ChatColor.YELLOW + "[mcMMO]"+ChatColor.GOLD+" Donate! Paypal "+ChatColor.GREEN+"nossr50@gmail.com"); //Where'd our notification go?
|
|
||||||
} else {
|
sPlayer.sendNotification(ChatColor.YELLOW + "[mcMMO]" + ChatColor.GOLD + " Donate!", ChatColor.GREEN + "nossr50@gmail.com", Material.DIAMOND);
|
||||||
if (LoadProperties.donateMessage)
|
}
|
||||||
player.sendMessage(ChatColor.YELLOW + "[mcMMO]"+ChatColor.GOLD+" Donate! Paypal "+ChatColor.GREEN+"nossr50@gmail.com");
|
|
||||||
|
sender.sendMessage(ChatColor.DARK_AQUA + "Donation Info:");
|
||||||
|
sender.sendMessage(ChatColor.GOLD + " - " + ChatColor.GREEN + "nossr50@gmail.com" + ChatColor.GOLD + " Paypal");
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -484,5 +484,6 @@ public class Repair {
|
|||||||
int slot = inventory.first(Material.WOOD);
|
int slot = inventory.first(Material.WOOD);
|
||||||
ItemStack item = inventory.getItem(slot);
|
ItemStack item = inventory.getItem(slot);
|
||||||
item.setAmount(item.getAmount() - 1);
|
item.setAmount(item.getAmount() - 1);
|
||||||
|
inventory.setItem(slot, item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -102,22 +102,13 @@ public class Skills {
|
|||||||
/* Woodcutting & Axes need to be treated differently.
|
/* Woodcutting & Axes need to be treated differently.
|
||||||
* Basically the tool always needs to ready and we check to see if the cooldown is over when the user takes action
|
* Basically the tool always needs to ready and we check to see if the cooldown is over when the user takes action
|
||||||
*/
|
*/
|
||||||
if (skill == SkillType.WOODCUTTING || skill == SkillType.AXES) {
|
if (ability.getPermissions(player) && tool.inHand(inHand) && !PP.getToolPreparationMode(tool)) {
|
||||||
if ((mcPermissions.getInstance().treeFeller(player) || mcPermissions.getInstance().skullSplitter(player)) &&
|
if (skill != SkillType.WOODCUTTING && skill != SkillType.AXES) {
|
||||||
tool.inHand(inHand) && !PP.getToolPreparationMode(tool)) {
|
|
||||||
if (LoadProperties.enableAbilityMessages) {
|
|
||||||
player.sendMessage(tool.getRaiseTool());
|
|
||||||
}
|
|
||||||
|
|
||||||
PP.setToolPreparationATS(tool, System.currentTimeMillis());
|
|
||||||
PP.setToolPreparationMode(tool, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (ability.getPermissions(player) && tool.inHand(inHand) && !PP.getToolPreparationMode(tool)) {
|
|
||||||
if (!PP.getAbilityMode(ability) && !cooldownOver(PP.getSkillDATS(ability) * TIME_CONVERSION_FACTOR, ability.getCooldown())) {
|
if (!PP.getAbilityMode(ability) && !cooldownOver(PP.getSkillDATS(ability) * TIME_CONVERSION_FACTOR, ability.getCooldown())) {
|
||||||
player.sendMessage(mcLocale.getString("Skills.TooTired") + ChatColor.YELLOW + " (" + calculateTimeLeft(PP.getSkillDATS(ability) * TIME_CONVERSION_FACTOR, ability.getCooldown()) + "s)");
|
player.sendMessage(mcLocale.getString("Skills.TooTired") + ChatColor.YELLOW + " (" + calculateTimeLeft(PP.getSkillDATS(ability) * TIME_CONVERSION_FACTOR, ability.getCooldown()) + "s)");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (LoadProperties.enableAbilityMessages) {
|
if (LoadProperties.enableAbilityMessages) {
|
||||||
player.sendMessage(tool.getRaiseTool());
|
player.sendMessage(tool.getRaiseTool());
|
||||||
|
@ -302,7 +302,7 @@ m.LVL=[[DARK_GRAY]]LVL: [[GREEN]]{0} [[DARK_AQUA]]XP[[YELLOW]]([[GOLD]]{1}[[YELL
|
|||||||
Combat.BeastLore=[[GREEN]]**BEAST LORE**
|
Combat.BeastLore=[[GREEN]]**BEAST LORE**
|
||||||
Combat.BeastLoreOwner=[[DARK_AQUA]]Owner ([[RED]]{0}[[DARK_AQUA]])
|
Combat.BeastLoreOwner=[[DARK_AQUA]]Owner ([[RED]]{0}[[DARK_AQUA]])
|
||||||
Combat.BeastLoreHealth=[[DARK_AQUA]]Health ([[GREEN]]{0}[[DARK_AQUA]]/{1})
|
Combat.BeastLoreHealth=[[DARK_AQUA]]Health ([[GREEN]]{0}[[DARK_AQUA]]/{1})
|
||||||
mcMMO.Description=[[DARK_AQUA]]About the [[YELLOW]]mcMMO[[DARK_AQUA]] Project:,[[GOLD]]mcMMO is an [[RED]]open source[[GOLD]] RPG mod created in February 2011,[[GOLD]]by [[BLUE]]nossr50[[GOLD]]. The goal is to provide a quality RPG experience.,[[DARK_AQUA]]Tips:,[[GOLD]] - [[GREEN]]Use [[RED]]/mcc[[GREEN]] to see commands,[[GOLD]] - [[GREEN]]Type [[RED]]/SKILLNAME[[GREEN]] to see detailed skill info,[[DARK_AQUA]]Developers:,[[GOLD]] - [[GREEN]]nossr50 [[BLUE]](Project Lead),[[GOLD]] - [[GREEN]]GJ [[BLUE]](Senior Developer),[[GOLD]] - [[GREEN]]NuclearW [[BLUE]](Developer),[[DARK_AQUA]]Useful Links:,[[GOLD]] - [[GREEN]]issues.mcmmo.org[[GOLD]] Bug Reporting,[[GOLD]] - [[GREEN]]#mcmmo @ irc.esper.net[[GOLD]] IRC Chat,[[GOLD]] - [[GREEN]]http://bit.ly/H6XwFb[[GOLD]] Bukkit Forum Thread,[[DARK_AQUA]]Donation Info:
|
mcMMO.Description=[[DARK_AQUA]]About the [[YELLOW]]mcMMO[[DARK_AQUA]] Project:,[[GOLD]]mcMMO is an [[RED]]open source[[GOLD]] RPG mod created in February 2011,[[GOLD]]by [[BLUE]]nossr50[[GOLD]]. The goal is to provide a quality RPG experience.,[[DARK_AQUA]]Tips:,[[GOLD]] - [[GREEN]]Use [[RED]]/mcc[[GREEN]] to see commands,[[GOLD]] - [[GREEN]]Type [[RED]]/SKILLNAME[[GREEN]] to see detailed skill info,[[DARK_AQUA]]Developers:,[[GOLD]] - [[GREEN]]nossr50 [[BLUE]](Project Lead),[[GOLD]] - [[GREEN]]GJ [[BLUE]](Senior Developer),[[GOLD]] - [[GREEN]]NuclearW [[BLUE]](Developer),[[DARK_AQUA]]Useful Links:,[[GOLD]] - [[GREEN]]issues.mcmmo.org[[GOLD]] Bug Reporting,[[GOLD]] - [[GREEN]]#mcmmo @ irc.esper.net[[GOLD]] IRC Chat,[[GOLD]] - [[GREEN]]http://bit.ly/H6XwFb[[GOLD]] Bukkit Forum Thread
|
||||||
Party.Locked=[[RED]]Party is locked, only party leader may invite.
|
Party.Locked=[[RED]]Party is locked, only party leader may invite.
|
||||||
Party.IsntLocked=[[GRAY]]Party is not locked
|
Party.IsntLocked=[[GRAY]]Party is not locked
|
||||||
Party.Unlocked=[[GRAY]]Party is unlocked
|
Party.Unlocked=[[GRAY]]Party is unlocked
|
||||||
|
Loading…
Reference in New Issue
Block a user