mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2025-02-22 14:41:51 +01:00
Waypoint custom time+key combos casting mode changes.
This commit is contained in:
parent
a1164d7874
commit
8da44fb7d7
@ -698,8 +698,8 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc
|
||||
return;
|
||||
}
|
||||
|
||||
MMOCore.plugin.configManager.getSimpleMessage("warping-comencing", "left", "" + ((120 - t) / 20)).send(getPlayer());
|
||||
if (t++ >= 100) {
|
||||
MMOCore.plugin.configManager.getSimpleMessage("warping-comencing", "left", "" + ((MMOCore.plugin.configManager.waypointWarpTime+20 - t) / 20)).send(getPlayer());
|
||||
if (t++ >= MMOCore.plugin.configManager.waypointWarpTime) {
|
||||
getPlayer().teleport(target.getLocation());
|
||||
getPlayer().addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 20, 1, false, false));
|
||||
MMOCore.plugin.soundManager.getSound(SoundEvent.WARP_TELEPORT).playTo(getPlayer());
|
||||
@ -707,11 +707,11 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc
|
||||
return;
|
||||
}
|
||||
|
||||
MMOCore.plugin.soundManager.getSound(SoundEvent.WARP_CHARGE).playTo(getPlayer(), 1, (float) (t / Math.PI * .015 + .5));
|
||||
double r = Math.sin((double) t / 100 * Math.PI);
|
||||
MMOCore.plugin.soundManager.getSound(SoundEvent.WARP_CHARGE).playTo(getPlayer(), 1, (float) (t / Math.PI * 1.5/MMOCore.plugin.configManager.waypointWarpTime + .5));
|
||||
double r = Math.sin((double) t / MMOCore.plugin.configManager.waypointWarpTime * Math.PI);
|
||||
for (double j = 0; j < Math.PI * 2; j += Math.PI / 4)
|
||||
getPlayer().getLocation().getWorld().spawnParticle(Particle.REDSTONE,
|
||||
getPlayer().getLocation().add(Math.cos((double) t / 20 + j) * r, (double) t / 50, Math.sin((double) t / 20 + j) * r), 1,
|
||||
getPlayer().getLocation().add(Math.cos((double) 5*t /MMOCore.plugin.configManager.waypointWarpTime + j) * r, (double) 2*t / MMOCore.plugin.configManager.waypointWarpTime, Math.sin((double) 5*t / MMOCore.plugin.configManager.waypointWarpTime + j) * r), 1,
|
||||
new Particle.DustOptions(Color.PURPLE, 1.25f));
|
||||
}
|
||||
}.runTaskTimer(MMOCore.plugin, 0, 1);
|
||||
|
@ -34,12 +34,12 @@ import net.Indyuce.mmocore.skill.cast.KeyCombo;
|
||||
import net.Indyuce.mmocore.skill.cast.PlayerKey;
|
||||
import net.Indyuce.mmocore.experience.ExperienceObject;
|
||||
import net.md_5.bungee.api.ChatColor;
|
||||
import org.apache.commons.lang.Validate;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Particle;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
import org.bukkit.craftbukkit.libs.org.apache.commons.lang3.Validate;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
@ -27,7 +27,7 @@ public class ConfigManager {
|
||||
public ChatColor staminaFull, staminaHalf, staminaEmpty;
|
||||
public long combatLogTimer, lootChestExpireTime, lootChestPlayerCooldown, globalSkillCooldown;
|
||||
public double lootChestsChanceWeight, fishingDropsChanceWeight;
|
||||
public int maxPartyLevelDifference,maxBoundSkills;
|
||||
public int maxPartyLevelDifference,maxBoundSkills,waypointWarpTime;
|
||||
|
||||
private final FileConfiguration messages;
|
||||
|
||||
@ -116,6 +116,7 @@ public class ConfigManager {
|
||||
cobbleGeneratorXP = MMOCore.plugin.getConfig().getBoolean("should-cobblestone-generators-give-exp");
|
||||
saveDefaultClassInfo = MMOCore.plugin.getConfig().getBoolean("save-default-class-info");
|
||||
maxBoundSkills= MMOCore.plugin.getConfig().getInt("max-bound-skills",6);
|
||||
waypointWarpTime=MMOCore.plugin.getConfig().getInt("waypoint-warp-time",5);
|
||||
}
|
||||
|
||||
private ChatColor getColorOrDefault(String key, ChatColor defaultColor) {
|
||||
|
@ -227,6 +227,9 @@ combat-log:
|
||||
# skills, etc.) when selecting a new class
|
||||
save-default-class-info: false
|
||||
|
||||
#Time taken in ticks to teleport using waypoints.
|
||||
waypoint-warp-time: 100
|
||||
|
||||
# Change this to the name of the color you want for
|
||||
# the different resource bar placeholders
|
||||
resource-bar-colors:
|
||||
|
Loading…
Reference in New Issue
Block a user