Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
c158a6f89f
@ -84,45 +84,45 @@ public enum Achievement
|
||||
new int[]{1},
|
||||
AchievementCategory.SURVIVAL_GAMES),
|
||||
|
||||
//SkyWars
|
||||
//Skywars
|
||||
SKYWARS_WINS("Sky King",2000,
|
||||
new String[]{"SkyWars.Wins"},
|
||||
new String[]{"Win 50 Games of SkyWars"},
|
||||
new String[]{"Skywars.Wins"},
|
||||
new String[]{"Win 50 Games of Skywars"},
|
||||
new int[]{50},
|
||||
AchievementCategory.SKYWARS),
|
||||
|
||||
SKYWARS_BOMBER("Master Bomber",500,
|
||||
new String[]{"SkyWars.DeathBomber"},
|
||||
new String[]{"Skywars.DeathBomber"},
|
||||
new String[]{"Kill 3 Players with \"Super Throwing TNT\" in a Single Game."},
|
||||
new int[]{1},
|
||||
AchievementCategory.SKYWARS),
|
||||
|
||||
SKYWARS_TNT("TNT Hoarder",250,
|
||||
new String[]{"SkyWars.BombPickups"},
|
||||
new String[]{"Skywars.BombPickups"},
|
||||
new String[]{"Pickup 100 \"Super Throwing TNT\"s"},
|
||||
new int[]{100},
|
||||
AchievementCategory.SKYWARS),
|
||||
|
||||
SKYWARS_ZOMBIE_KILLS("Left For Dead",750,
|
||||
new String[]{"SkyWars.ZombieKills"},
|
||||
new String[]{"Skywars.ZombieKills"},
|
||||
new String[]{"Kill 120 Zombies"},
|
||||
new int[]{120},
|
||||
AchievementCategory.SKYWARS),
|
||||
|
||||
SKYWARS_PLAYER_KILLS("Cold Blooded Killer",500,
|
||||
new String[]{"SkyWars.Kills"},
|
||||
new String[]{"Skywars.Kills"},
|
||||
new String[]{"Kill 250 Players"},
|
||||
new int[]{250},
|
||||
AchievementCategory.SKYWARS),
|
||||
|
||||
SKYWARS_NOCHEST("Survivalist",1000,
|
||||
new String[]{"SkyWars.NoChest"},
|
||||
new String[]{"Skywars.NoChest"},
|
||||
new String[]{"Win a Game Without Opening a Chest"},
|
||||
new int[]{1},
|
||||
AchievementCategory.SKYWARS),
|
||||
|
||||
SKYWARS_NOARMOR("Bare Minimum",1000,
|
||||
new String[]{"SkyWars.NoArmor"},
|
||||
new String[]{"Skywars.NoArmor"},
|
||||
new String[]{"Win a Game With No Armor"},
|
||||
new int[]{1},
|
||||
AchievementCategory.SKYWARS),
|
||||
|
@ -26,7 +26,7 @@ public enum AchievementCategory
|
||||
new StatDisplay[] { StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED },
|
||||
Material.DIAMOND_SWORD, 0, GameCategory.SURVIVAL, "Horseman Kit"),
|
||||
|
||||
SKYWARS("SkyWars",null,
|
||||
SKYWARS("Skywars",null,
|
||||
new StatDisplay[]{StatDisplay.WINS, StatDisplay.GAMES_PLAYED, StatDisplay.KILLS, StatDisplay.DEATHS, StatDisplay.GEMS_EARNED},
|
||||
Material.DOUBLE_PLANT, 5, GameCategory.SURVIVAL, "Destructor Kit"),
|
||||
|
||||
|
@ -139,10 +139,10 @@ public class DonationManager extends MiniDbClientPlugin<Donor>
|
||||
donor.AddGems(amount);
|
||||
}
|
||||
}
|
||||
|
||||
if (callback != null)
|
||||
callback.run(true);
|
||||
}
|
||||
|
||||
if (callback != null)
|
||||
callback.run(success);
|
||||
}
|
||||
}, caller, name, uuid.toString(), amount);
|
||||
}
|
||||
@ -221,10 +221,10 @@ public class DonationManager extends MiniDbClientPlugin<Donor>
|
||||
donor.addCoins(amount);
|
||||
}
|
||||
}
|
||||
|
||||
if (callback != null)
|
||||
callback.run(true);
|
||||
}
|
||||
|
||||
if (callback != null)
|
||||
callback.run(success);
|
||||
}
|
||||
}, caller, name, accountId, amount);
|
||||
}
|
||||
|
@ -72,11 +72,18 @@ public class CoinCommand extends CommandBase<DonationManager>
|
||||
{
|
||||
public void run(Boolean completed)
|
||||
{
|
||||
UtilPlayer.message(caller, F.main("Coin", "You gave " + F.elem(coins + " Coins") + " to " + F.name(targetName) + "."));
|
||||
|
||||
if (target != null)
|
||||
if (completed)
|
||||
{
|
||||
UtilPlayer.message(target, F.main("Coin", F.name(caller.getName()) + " gave you " + F.elem(coins + " Coins") + "."));
|
||||
UtilPlayer.message(caller, F.main("Coin", "You gave " + F.elem(coins + " Coins") + " to " + F.name(targetName) + "."));
|
||||
|
||||
if (target != null)
|
||||
{
|
||||
UtilPlayer.message(target, F.main("Coin", F.name(caller.getName()) + " gave you " + F.elem(coins + " Coins") + "."));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
UtilPlayer.message(caller, F.main("Coin", "There was an error giving " + F.elem(coins + "Coins") + " to " + F.name(targetName) + "."));
|
||||
}
|
||||
}
|
||||
}, caller.getName(), targetName, accountId, coins);
|
||||
|
@ -69,11 +69,18 @@ public class GemCommand extends CommandBase<DonationManager>
|
||||
{
|
||||
public void run(Boolean completed)
|
||||
{
|
||||
UtilPlayer.message(caller, F.main("gem", "You gave " + F.elem(gems + " gems") + " to " + F.name(targetName) + "."));
|
||||
|
||||
if (target != null)
|
||||
if (completed)
|
||||
{
|
||||
UtilPlayer.message(target, F.main("gem", F.name(caller.getName()) + " gave you " + F.elem(gems + " gems") + "."));
|
||||
UtilPlayer.message(caller, F.main("gem", "You gave " + F.elem(gems + " gems") + " to " + F.name(targetName) + "."));
|
||||
|
||||
if (target != null)
|
||||
{
|
||||
UtilPlayer.message(target, F.main("gem", F.name(caller.getName()) + " gave you " + F.elem(gems + " gems") + "."));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
UtilPlayer.message(caller, F.main("gem", "There was an error giving " + F.elem(gems + " gems") + " to " + F.name(targetName) + "."));
|
||||
}
|
||||
}
|
||||
}, caller.getName(), targetName, uuid, gems);
|
||||
|
@ -60,7 +60,7 @@ public enum GameDisplay
|
||||
|
||||
Build("Master Builders", Material.WOOD, (byte)0, GameCategory.CLASSICS, 50),
|
||||
Cards("Craft Against Humanity", Material.MAP, (byte)0, GameCategory.CLASSICS, 51),
|
||||
Skywars("SkyWars", Material.DOUBLE_PLANT, (byte)5, GameCategory.SURVIVAL, 52),
|
||||
Skywars("Skywars", Material.DOUBLE_PLANT, (byte)5, GameCategory.SURVIVAL, 52),
|
||||
|
||||
Event("Mineplex Event", Material.CAKE, (byte)0, GameCategory.EVENT, 999);
|
||||
|
||||
|
@ -144,4 +144,12 @@ public class TaskManager extends MiniDbClientPlugin<TaskClient>
|
||||
{
|
||||
return "SELECT taskId FROM accountTasks WHERE accountId = '" + accountId + "';";
|
||||
}
|
||||
|
||||
public Integer getTaskId(String taskName)
|
||||
{
|
||||
synchronized (_taskLock)
|
||||
{
|
||||
return _tasks.get(taskName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -398,10 +398,18 @@ public class ParkourManager extends MiniPlugin
|
||||
{
|
||||
public void run(Boolean completed)
|
||||
{
|
||||
UtilPlayer.message(player, F.main("Parkour", "You received " + F.elem(C.cGreen + fData.Gems + " Gems") + "."));
|
||||
|
||||
//Sound
|
||||
player.playSound(player.getLocation(), Sound.LEVEL_UP, 2f, 1.5f);
|
||||
if (completed)
|
||||
{
|
||||
UtilPlayer.message(player, F.main("Parkour", "You received " + F.elem(C.cGreen + fData.Gems + " Gems") + "."));
|
||||
|
||||
//Sound
|
||||
player.playSound(player.getLocation(), Sound.LEVEL_UP, 2f, 1.5f);
|
||||
}
|
||||
else
|
||||
{
|
||||
_taskManager.Get(player).TasksCompleted.remove(_taskManager.getTaskId(fData.Name));
|
||||
UtilPlayer.message(player, F.main("Parkour", "There as an error giving " + F.elem(C.cGreen + fData.Gems + " gems to you. Please click the NPC again.") + "."));
|
||||
}
|
||||
}
|
||||
}, "Parkour " + fData.Name, player.getName(), player.getUniqueId(), fData.Gems);
|
||||
|
||||
|
@ -150,9 +150,6 @@ public class PollManager extends MiniDbClientPlugin<PlayerPollData>
|
||||
// First update answer locally so we know it was answered
|
||||
Get(player).addAnswer(poll.getId(), answer);
|
||||
|
||||
UtilPlayer.message(player, F.main("Poll", "Thanks for your response!"));
|
||||
player.playSound(player.getEyeLocation(), Sound.LEVEL_UP, 1F, 0);
|
||||
|
||||
// Here we add the answer into the database, and once that is successful we give the coin reward
|
||||
_plugin.getServer().getScheduler().runTaskAsynchronously(_plugin, new Runnable()
|
||||
{
|
||||
@ -167,15 +164,20 @@ public class PollManager extends MiniDbClientPlugin<PlayerPollData>
|
||||
@Override
|
||||
public void run(Boolean completed)
|
||||
{
|
||||
// Need to get out of Async code
|
||||
_plugin.getServer().getScheduler().runTask(_plugin, new Runnable()
|
||||
if (completed)
|
||||
{
|
||||
@Override
|
||||
public void run()
|
||||
// Need to get out of Async code
|
||||
_plugin.getServer().getScheduler().runTask(_plugin, new Runnable()
|
||||
{
|
||||
UtilPlayer.message(player, F.main("Gem", "You received " + F.elem(poll.getCoinReward() + "") + " Gems!"));
|
||||
}
|
||||
});
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
UtilPlayer.message(player, F.main("Poll", "Thanks for your response!"));
|
||||
player.playSound(player.getEyeLocation(), Sound.LEVEL_UP, 1F, 0);
|
||||
UtilPlayer.message(player, F.main("Gem", "You received " + F.elem(poll.getCoinReward() + "") + " Gems!"));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}, "Poll", name, uuid, poll.getCoinReward());
|
||||
}
|
||||
|
@ -722,7 +722,7 @@ public class ServerManager extends MiniPlugin
|
||||
|
||||
public ServerNpcShop getSKYShop()
|
||||
{
|
||||
return _serverNpcShopMap.get("SkyWars");
|
||||
return _serverNpcShopMap.get("Skywars");
|
||||
}
|
||||
|
||||
public ServerNpcShop getPlayerGamesShop()
|
||||
|
@ -74,14 +74,14 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + getPlugin().getGroupTagPlayerCount("HG") + ChatColor.RESET + " other players!",
|
||||
}));
|
||||
|
||||
setItem(4, ItemStackFactory.Instance.CreateStack(Material.DOUBLE_PLANT.getId(), (byte) 5, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "SkyWars " + C.cGray + "Solo Survival", new String[]
|
||||
setItem(4, ItemStackFactory.Instance.CreateStack(Material.FEATHER.getId(), (byte) 0, 1, ChatColor.RESET + C.Bold + ChatColor.YELLOW + "Skywars " + C.cGray + "Solo Survival", new String[]
|
||||
{
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "High in the sky <Number> contenders fight for the right to rule the skies!",
|
||||
ChatColor.RESET + "Spawn on a floating island and build your path!",
|
||||
ChatColor.RESET + "Find and use weapons to take your enemies down!",
|
||||
ChatColor.RESET + "Standing up there, death ever looming if you fall..",
|
||||
ChatColor.RESET + "Can you fight? Can you live? Can you win SkyWars?",
|
||||
ChatColor.RESET + "16 contenders fight for the right to rule the skies!",
|
||||
ChatColor.RESET + "Spawn on a sky island and build your path!",
|
||||
ChatColor.RESET + "Find weapons to take your enemies down!",
|
||||
ChatColor.RESET + "Way up there, death ever looming if you fall..",
|
||||
ChatColor.RESET + "Can you fight? Can you live? Can you win Skywars?",
|
||||
ChatColor.RESET + "",
|
||||
ChatColor.RESET + "Join " + ChatColor.GREEN + getPlugin().getGroupTagPlayerCount("SKY") + ChatColor.RESET + " other players!",
|
||||
}));
|
||||
|
@ -137,10 +137,13 @@ public class TutorialManager extends MiniPlugin
|
||||
{
|
||||
public void run(Boolean completed)
|
||||
{
|
||||
UtilPlayer.message(player, F.main("Tutorial", "You received " + F.elem(C.cGreen + tut.GetGems() + " Gems") + "."));
|
||||
|
||||
//Sound
|
||||
player.playSound(player.getLocation(), Sound.LEVEL_UP, 2f, 1.5f);
|
||||
if (completed)
|
||||
{
|
||||
UtilPlayer.message(player, F.main("Tutorial", "You received " + F.elem(C.cGreen + tut.GetGems() + " Gems") + "."));
|
||||
|
||||
//Sound
|
||||
player.playSound(player.getLocation(), Sound.LEVEL_UP, 2f, 1.5f);
|
||||
}
|
||||
}
|
||||
}, "Tutorial " + tut.GetTutName(), player.getName(), player.getUniqueId(), tut.GetGems());
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ public enum GameType
|
||||
Runner("Runner"),
|
||||
SearchAndDestroy("Search and Destroy"),
|
||||
Sheep("Sheep Quest"),
|
||||
Skywars("SkyWars"),
|
||||
Skywars("Skywars"),
|
||||
Smash("Super Smash Mobs"),
|
||||
SmashTeams("Super Smash Mobs Teams", "Super Smash Mobs"),
|
||||
SmashDomination("Super Smash Mobs Domination", "Super Smash Mobs"),
|
||||
|
@ -7,8 +7,10 @@ import org.bukkit.entity.Player;
|
||||
import mineplex.core.account.CoreClient;
|
||||
import mineplex.core.command.CommandBase;
|
||||
import mineplex.core.common.Rank;
|
||||
import mineplex.core.common.util.Callback;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UUIDFetcher;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.staffServer.salespackage.SalesPackageManager;
|
||||
|
||||
public class CoinCommand extends CommandBase<SalesPackageManager>
|
||||
@ -35,8 +37,21 @@ public class CoinCommand extends CommandBase<SalesPackageManager>
|
||||
|
||||
if (client != null)
|
||||
{
|
||||
Plugin.getDonationManager().RewardCoins(null, caller.getName(), playerName, client.getAccountId(), amount);
|
||||
caller.sendMessage(F.main(Plugin.getName(), "Added " + amount + " coins to " + playerName + "'s account!"));
|
||||
Plugin.getDonationManager().RewardCoins(new Callback<Boolean>()
|
||||
{
|
||||
public void run(Boolean completed)
|
||||
{
|
||||
if (completed)
|
||||
{
|
||||
caller.sendMessage(F.main(Plugin.getName(), "Added " + amount + " coins to " + playerName + "'s account!"));
|
||||
}
|
||||
else
|
||||
{
|
||||
UtilPlayer.message(caller, F.main(Plugin.getName(), "There was an error giving " + F.elem(amount + "Coins") + " to " + F.name(playerName) + "."));
|
||||
}
|
||||
}
|
||||
}, caller.getName(), playerName, client.getAccountId(), amount);
|
||||
|
||||
}
|
||||
else
|
||||
caller.sendMessage(F.main(Plugin.getName(), "Couldn't find " + playerName + "'s account!"));
|
||||
|
@ -37,7 +37,7 @@ import nautilus.game.arcade.game.games.quiver.QuiverTeams;
|
||||
import nautilus.game.arcade.game.games.runner.Runner;
|
||||
import nautilus.game.arcade.game.games.searchanddestroy.SearchAndDestroy;
|
||||
import nautilus.game.arcade.game.games.sheep.SheepGame;
|
||||
import nautilus.game.arcade.game.games.skywars.SkyWars;
|
||||
import nautilus.game.arcade.game.games.skywars.Skywars;
|
||||
import nautilus.game.arcade.game.games.smash.SuperSmash;
|
||||
import nautilus.game.arcade.game.games.smash.SuperSmashDominate;
|
||||
import nautilus.game.arcade.game.games.smash.SuperSmashTeam;
|
||||
@ -117,7 +117,7 @@ public enum GameType
|
||||
|
||||
Build(Build.class, GameDisplay.Build),
|
||||
Cards(Cards.class, GameDisplay.Cards),
|
||||
Skywars(SkyWars.class, GameDisplay.Skywars),
|
||||
Skywars(Skywars.class, GameDisplay.Skywars),
|
||||
|
||||
Event(EventGame.class, GameDisplay.Event);
|
||||
|
||||
|
@ -43,8 +43,8 @@ import nautilus.game.arcade.game.games.skywars.kits.KitMadScientist;
|
||||
import nautilus.game.arcade.kit.Kit;
|
||||
import nautilus.game.arcade.ore.OreHider;
|
||||
import nautilus.game.arcade.stats.DeathBomberStatTracker;
|
||||
import nautilus.game.arcade.stats.SkyWarsKillZombieStatTracker;
|
||||
import nautilus.game.arcade.stats.SkyWarsTNTStatTracker;
|
||||
import nautilus.game.arcade.stats.SkywarsKillZombieStatTracker;
|
||||
import nautilus.game.arcade.stats.SkywarsTNTStatTracker;
|
||||
import nautilus.game.arcade.stats.WinWithoutOpeningChestStatTracker;
|
||||
import nautilus.game.arcade.stats.WinWithoutWearingArmorStatTracker;
|
||||
|
||||
@ -90,7 +90,7 @@ import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public class SkyWars extends SoloGame
|
||||
public class Skywars extends SoloGame
|
||||
{
|
||||
//./parse 19 30 56
|
||||
|
||||
@ -126,7 +126,7 @@ public class SkyWars extends SoloGame
|
||||
private ChestLoot _middleBlock = new ChestLoot();
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public SkyWars(ArcadeManager manager)
|
||||
public Skywars(ArcadeManager manager)
|
||||
{
|
||||
super(manager, GameType.Skywars, new Kit[]
|
||||
{
|
||||
@ -194,9 +194,9 @@ public class SkyWars extends SoloGame
|
||||
setAlreadyAnnounced(false);
|
||||
|
||||
registerStatTrackers(
|
||||
new SkyWarsTNTStatTracker(this),
|
||||
new SkywarsTNTStatTracker(this),
|
||||
new DeathBomberStatTracker(this, 3), //TNT Kills
|
||||
new SkyWarsKillZombieStatTracker(this),
|
||||
new SkywarsKillZombieStatTracker(this),
|
||||
new WinWithoutOpeningChestStatTracker(this),
|
||||
new WinWithoutWearingArmorStatTracker(this));
|
||||
|
||||
@ -809,7 +809,10 @@ public class SkyWars extends SoloGame
|
||||
{
|
||||
_worldBlocks.add(e.getBlock());
|
||||
|
||||
if (e.getBlock().getType() == Material.CHEST)
|
||||
if (e.getBlock().getType() == Material.CHEST ||
|
||||
e.getBlock().getType() == Material.PISTON_BASE ||
|
||||
e.getBlock().getType() == Material.PISTON_STICKY_BASE ||
|
||||
e.getBlock().getType() == Material.HOPPER)
|
||||
{
|
||||
e.setCancelled(true);
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.itemstack.ItemStackFactory;
|
||||
import nautilus.game.arcade.game.GameTeam;
|
||||
import nautilus.game.arcade.game.games.skywars.SkyWars;
|
||||
import nautilus.game.arcade.game.games.skywars.Skywars;
|
||||
import nautilus.game.arcade.game.games.skywars.events.TNTPickupEvent;
|
||||
|
||||
import org.bukkit.Color;
|
||||
@ -25,7 +25,7 @@ import org.bukkit.util.Vector;
|
||||
|
||||
public class TNTGenerator
|
||||
{
|
||||
private SkyWars Host;
|
||||
private Skywars Host;
|
||||
|
||||
private Location _loc;
|
||||
|
||||
@ -33,7 +33,7 @@ public class TNTGenerator
|
||||
private long _timeDelay = 15000;
|
||||
private Item _ent;
|
||||
|
||||
public TNTGenerator(SkyWars host, Location loc)
|
||||
public TNTGenerator(Skywars host, Location loc)
|
||||
{
|
||||
Host = host;
|
||||
|
||||
|
@ -8,10 +8,10 @@ import org.bukkit.entity.Zombie;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
|
||||
public class SkyWarsKillZombieStatTracker extends StatTracker<Game>
|
||||
public class SkywarsKillZombieStatTracker extends StatTracker<Game>
|
||||
{
|
||||
|
||||
public SkyWarsKillZombieStatTracker(Game game)
|
||||
public SkywarsKillZombieStatTracker(Game game)
|
||||
{
|
||||
super(game);
|
||||
}
|
||||
|
@ -6,10 +6,10 @@ import nautilus.game.arcade.game.games.skywars.events.TNTPickupEvent;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
|
||||
public class SkyWarsTNTStatTracker extends StatTracker<Game>
|
||||
public class SkywarsTNTStatTracker extends StatTracker<Game>
|
||||
{
|
||||
|
||||
public SkyWarsTNTStatTracker(Game game)
|
||||
public SkywarsTNTStatTracker(Game game)
|
||||
{
|
||||
super(game);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user