mirror of
https://github.com/TotalFreedomMC/PlayerParticles.git
synced 2025-02-11 19:50:25 +00:00
v4.4 Bug Fixes
Fix bunches of bugs
This commit is contained in:
parent
022a4efee2
commit
cfa846604f
6 changed files with 26 additions and 13 deletions
|
@ -1,9 +1,12 @@
|
||||||
== UPDATING WILL DELETE YOUR CONFIG.YML ==
|
== UPDATING WILL DELETE YOUR CONFIG.YML ==
|
||||||
* Create a backup of your config.yml if you wish to import all your old settings!
|
* Create a backup of your config.yml if you wish to import all your old settings!
|
||||||
|
=== v4.4 ===
|
||||||
|
* Fix problems with subversions
|
||||||
|
* Fix issues with custom style plugins
|
||||||
=== v4.3.1 ===
|
=== v4.3.1 ===
|
||||||
* Fix players with the permission playerparticles.* being able to force reset other player's particles when they weren't supposed to be able to
|
* Fix players with the permission playerparticles.* being able to force reset other player's particles when they weren't supposed to be able to
|
||||||
* Fix players being saved in the config/database even if they haven't used the plugin
|
* Fix players being saved in the config/database even if they haven't used the plugin
|
||||||
* Other internal changes & optimizations
|
* Other internal changes & optimizations
|
||||||
=== v4.3 ===
|
=== v4.3 ===
|
||||||
* Fix effects and styles not defaulting to 'none' if the player no longer has permission
|
* Fix effects and styles not defaulting to 'none' if the player no longer has permission
|
||||||
* Fix errors printing to console resulting from offline players trying to spawn particles
|
* Fix errors printing to console resulting from offline players trying to spawn particles
|
||||||
|
|
|
@ -27,6 +27,7 @@ import java.sql.SQLException;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
|
|
||||||
import com.esophose.playerparticles.library.MySQL;
|
import com.esophose.playerparticles.library.MySQL;
|
||||||
import com.esophose.playerparticles.manager.MessageManager;
|
import com.esophose.playerparticles.manager.MessageManager;
|
||||||
|
@ -72,7 +73,7 @@ public class PlayerParticles extends JavaPlugin {
|
||||||
getCommand("pp").setExecutor(new ParticleCommandExecutor());
|
getCommand("pp").setExecutor(new ParticleCommandExecutor());
|
||||||
Bukkit.getPluginManager().registerEvents(new ParticleManager(), this);
|
Bukkit.getPluginManager().registerEvents(new ParticleManager(), this);
|
||||||
Bukkit.getPluginManager().registerEvents(new PluginUpdateListener(), this);
|
Bukkit.getPluginManager().registerEvents(new PluginUpdateListener(), this);
|
||||||
if (getConfig().getDouble("version") < Double.parseDouble(getDescription().getVersion())) {
|
if (getConfig().getDouble("version") < Double.parseDouble(getDescription().getVersion().substring(0, 3))) {
|
||||||
File configFile = new File(getDataFolder(), "config.yml");
|
File configFile = new File(getDataFolder(), "config.yml");
|
||||||
configFile.delete();
|
configFile.delete();
|
||||||
saveDefaultConfig();
|
saveDefaultConfig();
|
||||||
|
@ -80,13 +81,11 @@ public class PlayerParticles extends JavaPlugin {
|
||||||
getLogger().warning("The config.yml has been updated to v" + getDescription().getVersion() + "!");
|
getLogger().warning("The config.yml has been updated to v" + getDescription().getVersion() + "!");
|
||||||
}
|
}
|
||||||
checkDatabase();
|
checkDatabase();
|
||||||
ParticleManager.refreshPPlayers();
|
|
||||||
ParticleManager.addAllFixedEffects();
|
|
||||||
startTask();
|
startTask();
|
||||||
|
|
||||||
if (shouldCheckUpdates()) {
|
if (shouldCheckUpdates()) {
|
||||||
Updater updater = new Updater(this, 82823, this.getFile(), Updater.UpdateType.NO_DOWNLOAD, false);
|
Updater updater = new Updater(this, 82823, this.getFile(), Updater.UpdateType.NO_DOWNLOAD, false);
|
||||||
if (Double.parseDouble(updater.getLatestName().replaceAll("PlayerParticles v", "")) > Double.parseDouble(getPlugin().getDescription().getVersion())) {
|
if (Double.parseDouble(updater.getLatestName().replaceAll("PlayerParticles v", "").replaceAll("\\.", "")) > Double.parseDouble(getPlugin().getDescription().getVersion().replaceAll("\\.", ""))) {
|
||||||
updateVersion = updater.getLatestName().replaceAll("PlayerParticles v", "");
|
updateVersion = updater.getLatestName().replaceAll("PlayerParticles v", "");
|
||||||
getLogger().info("[PlayerParticles] An update (v" + updateVersion + ") is available! You are running v" + getPlugin().getDescription().getVersion());
|
getLogger().info("[PlayerParticles] An update (v" + updateVersion + ") is available! You are running v" + getPlugin().getDescription().getVersion());
|
||||||
}
|
}
|
||||||
|
@ -165,10 +164,19 @@ public class PlayerParticles extends JavaPlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Starts the task reponsible for spawning particles
|
* Starts the task reponsible for spawning particles
|
||||||
|
* Run in the synchronous task so it starts after all plugins have loaded, including extensions
|
||||||
*/
|
*/
|
||||||
private void startTask() {
|
private void startTask() {
|
||||||
|
final Plugin playerParticles = this;
|
||||||
|
new BukkitRunnable() {
|
||||||
|
public void run() {
|
||||||
|
ParticleManager.refreshPPlayers(); // Add any online players who have particles
|
||||||
|
ParticleManager.addAllFixedEffects(); // Add all fixed effects
|
||||||
|
|
||||||
double ticks = getConfig().getInt("ticks-per-particle");
|
double ticks = getConfig().getInt("ticks-per-particle");
|
||||||
new ParticleManager().runTaskTimer(this, 20, (long) ticks);
|
new ParticleManager().runTaskTimer(playerParticles, 20, (long) ticks);
|
||||||
|
}
|
||||||
|
}.runTaskLater(playerParticles, 20);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -175,6 +175,7 @@ public class ParticleManager extends BukkitRunnable implements Listener {
|
||||||
|
|
||||||
if (player == null) { // Skip and remove, why are they still in the array if they are offline?
|
if (player == null) { // Skip and remove, why are they still in the array if they are offline?
|
||||||
particlePlayers.remove(i);
|
particlePlayers.remove(i);
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Perform permission and validity checks
|
// Perform permission and validity checks
|
||||||
|
|
|
@ -27,8 +27,9 @@ public class PluginUpdateListener implements Listener {
|
||||||
public void onPlayerJoin(PlayerJoinEvent e) {
|
public void onPlayerJoin(PlayerJoinEvent e) {
|
||||||
if (e.getPlayer().isOp()) {
|
if (e.getPlayer().isOp()) {
|
||||||
if (PlayerParticles.updateVersion != null) {
|
if (PlayerParticles.updateVersion != null) {
|
||||||
MessageManager.sendCustomMessage(e.getPlayer(), ChatColor.YELLOW + "An update (" + ChatColor.AQUA + "v" + PlayerParticles.updateVersion + ChatColor.YELLOW + ") is available! You are running " + ChatColor.AQUA + "v" + PlayerParticles.getPlugin().getDescription().getVersion());
|
MessageManager.sendCustomMessage(e.getPlayer(), ChatColor.YELLOW + "An update (" + ChatColor.AQUA + "v" + PlayerParticles.updateVersion + ChatColor.YELLOW + ") is available! " +
|
||||||
MessageManager.sendCustomMessage(e.getPlayer(), ChatColor.YELLOW + "Download from: https://dev.bukkit.org/projects/playerparticles");
|
"You are running " + ChatColor.AQUA + "v" + PlayerParticles.getPlugin().getDescription().getVersion() + ChatColor.YELLOW +
|
||||||
|
". https://dev.bukkit.org/projects/playerparticles");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
# Changing this value will reset your config on the next server reload / restart.
|
# Changing this value will reset your config on the next server reload / restart.
|
||||||
# I don't recommend changing it
|
# I don't recommend changing it
|
||||||
version: 4.3
|
version: 4.4
|
||||||
|
|
||||||
# How many ticks to wait before spawning more particles
|
# How many ticks to wait before spawning more particles
|
||||||
# Increasing this value may cause less lag (if there was any), but will decrease prettiness
|
# Increasing this value may cause less lag (if there was any), but will decrease prettiness
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
name: PlayerParticles
|
name: PlayerParticles
|
||||||
main: com.esophose.playerparticles.PlayerParticles
|
main: com.esophose.playerparticles.PlayerParticles
|
||||||
version: 4.3
|
version: 4.4
|
||||||
description: Make particles around players in fancy ways.
|
description: Make particles around players in fancy ways.
|
||||||
author: Esophose
|
author: Esophose
|
||||||
website: http://dev.bukkit.org/bukkit-plugins/playerparticles/
|
website: http://dev.bukkit.org/bukkit-plugins/playerparticles/
|
||||||
|
|
Loading…
Reference in a new issue