diff --git a/Plugins/Mineplex.Core/src/mineplex/core/bonuses/commands/TicketCommand.java b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/commands/TicketCommand.java index 20aa7ad66..307a57427 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/bonuses/commands/TicketCommand.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/commands/TicketCommand.java @@ -2,6 +2,7 @@ package mineplex.core.bonuses.commands; 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.UtilPlayer; import mineplex.core.bonuses.BonusManager; @@ -12,7 +13,7 @@ public class TicketCommand extends CommandBase { public TicketCommand(BonusManager plugin) { - super(plugin, Rank.DEVELOPER, "ticket"); + super(plugin, Rank.ADMIN, "ticket"); } @Override @@ -36,15 +37,28 @@ public class TicketCommand extends CommandBase { try { - int tickets = Integer.parseInt(ticketString); - Plugin.Get(target).setTickets(Plugin.Get(targetName).getTickets() + tickets); - - UtilPlayer.message(caller, F.main("Carl", "You gave " + F.elem(tickets + " Carl Tickets") + " to " + F.name(targetName) + ".")); - - if (target != null) + final int tickets = Integer.parseInt(ticketString); + int accountId = Plugin.getClientManager().getAccountId(target); + Plugin.getRepository().attemptAddTickets(accountId, Plugin.Get(target), tickets, new Callback() { - UtilPlayer.message(target, F.main("Carl", F.name(caller.getName()) + " gave you " + F.elem(tickets + " Carl Tickets") + ".")); - } + @Override + public void run(Boolean data) + { + if (data) + { + UtilPlayer.message(caller, F.main("Carl", "You gave " + F.elem(tickets + " Carl Tickets") + " to " + F.name(targetName) + ".")); + + if (target != null && !target.equals(caller)) + { + UtilPlayer.message(target, F.main("Carl", F.name(caller.getName()) + " gave you " + F.elem(tickets + " Carl Tickets") + ".")); + } + } + else + { + UtilPlayer.message(caller, F.main("Carl", "Failed to give tickets. Try again later!")); + } + } + }); } catch (Exception e) { diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/modules/SoccerManager.java b/Plugins/Mineplex.Hub/src/mineplex/hub/modules/SoccerManager.java index 6383be7a3..3fde170ec 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/modules/SoccerManager.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/modules/SoccerManager.java @@ -13,6 +13,8 @@ import org.bukkit.entity.Entity; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; import org.bukkit.entity.Slime; +import org.bukkit.entity.TNTPrimed; +import org.bukkit.entity.WitherSkull; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.entity.EntityDamageByEntityEvent; @@ -353,15 +355,15 @@ public class SoccerManager extends MiniPlugin if (_ball != null && _ball.equals(ent)) continue; - - if (ent instanceof Bat) - { - ent.remove(); - continue; - } if (inPlayerArena(ent)) { + if (ent instanceof Bat || ent instanceof WitherSkull || ent instanceof TNTPrimed) + { + ent.remove(); + continue; + } + Location bounce = UtilAlg.getMidpoint(_cornerFieldPlayerA, _cornerFieldPlayerB); bounce.setY(Math.min(_cornerFieldPlayerA.getY(), _cornerFieldPlayerB.getY())); @@ -370,7 +372,6 @@ public class SoccerManager extends MiniPlugin bottom = bottom.getVehicle(); UtilAction.velocity(bottom, UtilAlg.getTrajectory(bounce, ent.getLocation()), 1, false, 0, 0.4, 1, true); - } } } @@ -425,12 +426,12 @@ public class SoccerManager extends MiniPlugin { if (_active.size() < 8) { - UtilPlayer.message(player, F.main("Soccer", "You must be wearing Red/Blue Team Outfit.")); - UtilPlayer.message(player, F.main("Soccer", "Type " + F.elem("/team red") + " or " + F.elem("/team blue") + "!")); + UtilPlayer.message(player, F.main("Slimeball", "You must be wearing Red/Blue Team Outfit.")); + UtilPlayer.message(player, F.main("Slimeball", "Type " + F.elem("/team red") + " or " + F.elem("/team blue") + "!")); } else { - UtilPlayer.message(player, F.main("Soccer", "The game is currently full!")); + UtilPlayer.message(player, F.main("Slimeball", "The game is currently full!")); } } } @@ -446,11 +447,11 @@ public class SoccerManager extends MiniPlugin _active.add(player); if (color == null) - UtilPlayer.message(player, F.main("Parkour", "You have entered " + F.elem("Soccer Mode") + ".")); + UtilPlayer.message(player, F.main("Parkour", "You have entered " + F.elem("Slimeball Mode") + ".")); else if (color == Color.RED) - UtilPlayer.message(player, F.main("Parkour", "You have joined " + F.elem(C.cRed + "Red Soccer Team") + ".")); + UtilPlayer.message(player, F.main("Parkour", "You have joined " + F.elem(C.cRed + "Red Slimeball Team") + ".")); else if (color == Color.AQUA) - UtilPlayer.message(player, F.main("Parkour", "You have joined " + F.elem(C.cAqua + "Blue Soccer Team") + ".")); + UtilPlayer.message(player, F.main("Parkour", "You have joined " + F.elem(C.cAqua + "Blue Slimeball Team") + ".")); ArrayList outfit = new ArrayList(); outfit.add("Team Helmet"); @@ -465,7 +466,7 @@ public class SoccerManager extends MiniPlugin else { _active.remove(player); - UtilPlayer.message(player, F.main("Parkour", "You have exited " + F.elem("Soccer Mode") + ".")); + UtilPlayer.message(player, F.main("Parkour", "You have exited " + F.elem("Slimeball Mode") + ".")); } } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkMammoth.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkMammoth.java index e91dc9742..23134ec56 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkMammoth.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkMammoth.java @@ -14,7 +14,7 @@ public class PerkMammoth extends Perk { super("Mammoth", new String[] { - C.cGray + "Take 50% knockback and deal 150% knockback", + C.cGray + "Take 75% knockback and deal 125% knockback", }); } @@ -30,7 +30,7 @@ public class PerkMammoth extends Perk if (!Kit.HasKit(damager)) return; - event.AddKnockback(GetName(), 1.5d); + event.AddKnockback(GetName(), 1.25d); } @EventHandler(priority = EventPriority.HIGH) @@ -45,6 +45,6 @@ public class PerkMammoth extends Perk if (!Kit.HasKit(damagee)) return; - event.AddKnockback(GetName(), 0.5d); + event.AddKnockback(GetName(), 0.75d); } } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkNeedler.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkNeedler.java index ce4603693..3844440ba 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkNeedler.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkNeedler.java @@ -131,7 +131,7 @@ public class PerkNeedler extends SmashPerk DamageCause.THORNS, 1.1, true, true, false, damager.getName(), GetName()); - if(Manager.GetGame().GetTeam(event.GetDamageePlayer()) != Manager.GetGame().GetTeam(damager)) + if(!Manager.GetGame().GetTeam(event.GetDamageePlayer()).equals(Manager.GetGame().GetTeam(damager))) { Manager.GetCondition().Factory().Poison(GetName(), event.GetDamageeEntity(), damager, 2, 0, false, false, false); }