Merge remote-tracking branch 'origin/master'

This commit is contained in:
Shaun Bennett 2015-02-10 13:33:59 -05:00
commit e21e27f07f
5 changed files with 65 additions and 7 deletions

View File

@ -32,7 +32,7 @@ public class PlayerTracker implements Listener
{
public void run()
{
_repository.updatePlayerServer(event.getPlayer().getName(), event.getPlayer().getServer().getInfo().getName());
_repository.updatePlayerServer(event.getPlayer().getName(), event.getServer().getInfo().getName());
}
});
}

View File

@ -2,11 +2,11 @@ package mineplex.core.reward;
public enum RewardType
{
//% Chances Mythic Legend Rare Uncommon
GameLoot( 0.000001, 0.001, 0.004, 3),
OldChest( 0, 0.01, 0.04, 5),
AncientChest( 0, 1, 4, 25),
MythicalChest( 0.5, 2.5, 10, 40);
//% Chances Mythic Legend Rare Uncommon
GameLoot( 0.000001, 0.00001, 0.0001, 3),
OldChest( 0, 0.01, 0.04, 5),
AncientChest( 0, 1, 4, 25),
MythicalChest( 0.5, 2.5, 10, 40);
private double _mythicalChance;
private double _legendaryChance;

View File

@ -84,6 +84,7 @@ import mineplex.minecraft.game.core.fire.Fire;
import nautilus.game.arcade.addons.CompassAddon;
import nautilus.game.arcade.addons.SoupAddon;
import nautilus.game.arcade.addons.TeamArmorAddon;
import nautilus.game.arcade.command.DisguiseCommand;
import nautilus.game.arcade.command.GameCommand;
import nautilus.game.arcade.command.WriteCommand;
import nautilus.game.arcade.command.YoutubeCommand;
@ -306,6 +307,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
addCommand(new GameCommand(this));
addCommand(new WriteCommand(this));
addCommand(new YoutubeCommand(this));
addCommand(new DisguiseCommand(this));
}
public GameServerConfig GetServerConfig()

View File

@ -0,0 +1,56 @@
package nautilus.game.arcade.command;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import nautilus.game.arcade.ArcadeManager;
import net.minecraft.util.com.mojang.authlib.GameProfile;
import mineplex.core.command.CommandBase;
import mineplex.core.common.Rank;
import mineplex.core.common.util.C;
import mineplex.core.common.util.ProfileLoader;
import mineplex.core.common.util.UUIDFetcher;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.disguise.disguises.DisguisePlayer;
public class DisguiseCommand extends CommandBase<ArcadeManager>
{
public DisguiseCommand(ArcadeManager plugin)
{
super(plugin, Rank.OWNER, new Rank[] {Rank.OWNER}, "disguise");
}
@Override
public void Execute(final Player caller, final String[] args)
{
if (args.length == 0)
{
UtilPlayer.message(caller, C.cRed + C.Bold + "/disguise <name>");
return;
}
Bukkit.getServer().getScheduler().runTaskAsynchronously(Plugin.GetPlugin(), new Runnable()
{
@Override
public void run()
{
try
{
GameProfile profile = new ProfileLoader(UUIDFetcher.getUUIDOf(args[0]).toString(), args[0]).loadProfile();
DisguisePlayer playerDisguise = new DisguisePlayer(caller, profile);
Plugin.GetDisguise().disguise(playerDisguise);
UtilPlayer.message(caller, C.cGreen + C.Bold + "Disguise Active: " + ChatColor.RESET + args[0]);
}
catch (Exception e)
{
UtilPlayer.message(caller, C.cRed + C.Bold + "Invalid Disguise Name: " + ChatColor.RESET + args[0]);
return;
}
}}
);
}
}

View File

@ -162,7 +162,7 @@ public class GameLootManager implements Listener
return false;
}
Reward reward = _rewardManager.nextReward(player, null, false, RewardType.GameLoot);
Reward reward = _rewardManager.nextReward(player, null, false, RewardType.GameLoot, true);
RewardData rewardData = reward.giveReward("GameLoot", player);