reset player name onDisable()
when the plugin is disabled, reset all the currently connected player names to default. fixes #1
This commit is contained in:
@@ -4,7 +4,7 @@ org.gradle.jvmargs=-Xmx1G
|
|||||||
org.gradle.parallel=true
|
org.gradle.parallel=true
|
||||||
|
|
||||||
# Plugin
|
# Plugin
|
||||||
plugin_version=0.1.1
|
plugin_version=0.1.2
|
||||||
plugin_group=xyz.twokilohertz
|
plugin_group=xyz.twokilohertz
|
||||||
plugin_base_name=playerlistdeathcount
|
plugin_base_name=playerlistdeathcount
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package xyz.twokilohertz.playerlistdeathcount;
|
package xyz.twokilohertz.playerlistdeathcount;
|
||||||
|
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.HandlerList;
|
import org.bukkit.event.HandlerList;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.plugin.PluginManager;
|
import org.bukkit.plugin.PluginManager;
|
||||||
@@ -19,5 +20,9 @@ public class PlayerListDeathCount extends JavaPlugin {
|
|||||||
@Override
|
@Override
|
||||||
public void onDisable() {
|
public void onDisable() {
|
||||||
HandlerList.unregisterAll(playerEventListener);
|
HandlerList.unregisterAll(playerEventListener);
|
||||||
|
|
||||||
|
for (Player player : getServer().getOnlinePlayers()) {
|
||||||
|
player.setPlayerListName(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
name: PlayerListDeathCount
|
name: PlayerListDeathCount
|
||||||
version: 0.1.1
|
version: 0.1.2
|
||||||
description: Show the number of deaths players have in the server online player list
|
description: Show the number of deaths players have in the server online player list
|
||||||
author: twokilohertz
|
author: twokilohertz
|
||||||
website: https://git.2khz.xyz/adam/PlayerListDeathCount
|
website: https://git.2khz.xyz/adam/PlayerListDeathCount
|
||||||
|
|||||||
Reference in New Issue
Block a user