Merge branch 'master' of ssh://184.154.0.242:7999/min/Mineplex
This commit is contained in:
commit
a2d7aa77fe
@ -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<BonusManager>
|
||||
{
|
||||
public TicketCommand(BonusManager plugin)
|
||||
{
|
||||
super(plugin, Rank.DEVELOPER, "ticket");
|
||||
super(plugin, Rank.ADMIN, "ticket");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -36,15 +37,28 @@ public class TicketCommand extends CommandBase<BonusManager>
|
||||
{
|
||||
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<Boolean>()
|
||||
{
|
||||
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)
|
||||
{
|
||||
|
@ -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;
|
||||
@ -354,14 +356,14 @@ 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<String> outfit = new ArrayList<String>();
|
||||
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") + "."));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user