mirror of
https://github.com/plexusorg/Module-TFMExtras.git
synced 2024-12-03 16:52:10 +00:00
Merge pull request #2 from plexusorg/ultimatum-for-jp-ultimate
Removes "ultimate" jumppads mode
This commit is contained in:
commit
346ba909fd
@ -20,7 +20,7 @@ import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@CommandParameters(name = "jumppads", usage = "/jumppads <mode> [player]", description = "Enables jump pads for yourself or another player. Mode types available: none, regular, enhanced, extreme, ultimate", aliases = "jp,pads,launchpads")
|
||||
@CommandParameters(name = "jumppads", usage = "/jumppads <mode> [player]", description = "Enables jump pads for yourself or another player. Mode types available: none, regular, enhanced, extreme", aliases = "jp,pads,launchpads")
|
||||
@CommandPermissions(permission = "plex.tfmextras.jumppads", source = RequiredCommandSource.ANY)
|
||||
public class JumpPadsCommand extends PlexCommand
|
||||
{
|
||||
@ -126,7 +126,7 @@ public class JumpPadsCommand extends PlexCommand
|
||||
{
|
||||
if (args.length == 1)
|
||||
{
|
||||
return Arrays.asList("none", "normal", "enhanced", "extreme", "ultimate");
|
||||
return Arrays.asList("none", "normal", "enhanced", "extreme");
|
||||
}
|
||||
else if (args.length == 2)
|
||||
{
|
||||
|
@ -4,6 +4,5 @@ public enum Mode
|
||||
{
|
||||
NORMAL,
|
||||
ENHANCED,
|
||||
EXTREME,
|
||||
ULTIMATE
|
||||
EXTREME
|
||||
}
|
||||
|
@ -100,40 +100,6 @@ public class JumpPadsListener extends PlexListener
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (mode.equals(Mode.ULTIMATE))
|
||||
{
|
||||
blockWrapMap.forEach((b, w) ->
|
||||
{
|
||||
if (jumpPads.wool.getValues().contains(b.getType()))
|
||||
{
|
||||
if (w.y() == -1)
|
||||
{
|
||||
jumpPads.extreme(playerVector.add(new Vector(0.0, jumpPads.SCALAR * jumpPads.STRENGTH, 0.0)));
|
||||
}
|
||||
|
||||
switch (w.x())
|
||||
{
|
||||
case (-1):
|
||||
jumpPads.extreme(playerVector.add(new Vector(-jumpPads.SCALAR * jumpPads.STRENGTH, 0.0, 0.0)));
|
||||
case (1):
|
||||
jumpPads.extreme(playerVector.add(new Vector(jumpPads.SCALAR * jumpPads.STRENGTH, 0.0, 0.0)));
|
||||
}
|
||||
|
||||
switch (w.z())
|
||||
{
|
||||
case (-1):
|
||||
jumpPads.extreme(playerVector.add(new Vector(0.0, 0.0, -jumpPads.SCALAR * jumpPads.STRENGTH)));
|
||||
case (1):
|
||||
jumpPads.extreme(playerVector.add(new Vector(0.0, 0.0, jumpPads.SCALAR * jumpPads.STRENGTH)));
|
||||
|
||||
}
|
||||
|
||||
player.setVelocity(playerVector);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGHEST)
|
||||
|
Loading…
Reference in New Issue
Block a user