disguise command (not yet working fully)
This commit is contained in:
parent
cb9246281c
commit
884df48695
@ -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()
|
||||
|
@ -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;
|
||||
}
|
||||
}}
|
||||
);
|
||||
}
|
||||
}
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user