Skip to content

Commit

Permalink
Remove particle tracers
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerS1066 committed Jul 3, 2024
1 parent 5ad3b05 commit e18ad1d
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 89 deletions.
44 changes: 0 additions & 44 deletions src/main/java/com/snowleopard1863/APTurrets/TracerManager.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,7 @@ public void fire(Player player) {
return;

Arrow arrow = launchArrow(player);

if (Config.UseParticleTracers) {
TurretsMain.getInstance().getTracerManager().startTracing(arrow);
} else {
arrow.setCritical(true);
}
arrow.setCritical(true);

World world = player.getWorld();
world.playSound(player.getLocation(), Sound.ENTITY_FIREWORK_ROCKET_BLAST, 1.0F, 2.0F);
Expand Down
13 changes: 0 additions & 13 deletions src/main/java/com/snowleopard1863/APTurrets/TurretsMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import com.snowleopard1863.APTurrets.config.Config;
import com.snowleopard1863.APTurrets.listener.*;
import com.snowleopard1863.APTurrets.task.ArrowTracerTask;
import com.snowleopard1863.APTurrets.utils.NMUtils;
import net.milkbowl.vault.economy.Economy;
import org.bukkit.ChatColor;
Expand All @@ -22,7 +21,6 @@ public static TurretsMain getInstance() {

private NMUtils nmsUtils;
private TurretManager turretManager;
private TracerManager tracerManager;

public void onEnable() {
saveDefaultConfig();
Expand All @@ -36,7 +34,6 @@ public void onEnable() {
Config.IncindiaryChance = getConfig().getDouble("IncindiaryChance", 0.1D);
Config.Damage = getConfig().getDouble("Damage", 2.5D);
Config.ArrowVelocity = getConfig().getDouble("ArrowVelocity", 4.0D);
Config.UseParticleTracers = getConfig().getBoolean("UseParticleTracers", true);
Config.DelayBetweenShots = getConfig().getDouble("DelayBetweenShots", 0.2D);
Config.DoRaycast = getConfig().getBoolean("DoRaycast", false);
Config.RaycastRadians = getConfig().getDouble("RaycastAngle", 5.0D) / 180.0 * Math.PI;
Expand Down Expand Up @@ -71,10 +68,6 @@ public void onEnable() {
return;
}

if (Config.UseParticleTracers) {
getServer().getScheduler().scheduleSyncRepeatingTask(this, new ArrowTracerTask(), 0L, 0L);
}

getServer().getPluginManager().registerEvents(this, this);
getServer().getPluginManager().registerEvents(new EntityDamageEntityListener(), this);
getServer().getPluginManager().registerEvents(new PlayerDeathListener(), this);
Expand All @@ -88,14 +81,12 @@ public void onEnable() {

nmsUtils = new NMUtils();
turretManager = new TurretManager();
tracerManager = new TracerManager();
getLogger().info(getDescription().getName() + " v" + getDescription().getVersion() + " has been enabled.");
instance = this;
}

public void onDisable() {
turretManager.disable();
tracerManager.disable();
getLogger().info(getDescription().getName() + " v" + getDescription().getVersion() + " has been disabled.");
}

Expand All @@ -110,8 +101,4 @@ public NMUtils getNMUtils() {
public TurretManager getTurretManager() {
return turretManager;
}

public TracerManager getTracerManager() {
return tracerManager;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ public class Config {
public static double IncindiaryChance = 0.1D;
public static double ArrowVelocity = 4.0D;
public static int KnockbackStrength = 2;
public static boolean UseParticleTracers = true;
public static double DelayBetweenShots = 0.2D;
public static boolean DoRaycast = false;
public static double RaycastRadians = 2.0 / 180.0 * Math.PI;
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ Damage: 2.5 # How much damage this should deal
IncindiaryChance: 0.1 # Chance to incinerate your enemies
ArrowVelocity: 4.0 # Velocity for arrows to go
KnockbackStrength: 2 # Knockback strength of the arrows
UseParticleTracers: true # Whether to use tracers
DelayBetweenShots: 0.2 # Delay between each shot
DoRaycast: false # Do raycast instant shots for elytra fliers
RaycastAngle: 5.0 # Angle for the raycast cone of aiming
Expand Down

0 comments on commit e18ad1d

Please sign in to comment.