aboutsummaryrefslogtreecommitdiff
path: root/src/net/brysonsteck/PlayerAttributes.java
diff options
context:
space:
mode:
authorBryson Steck <steck.bryson@gmail.com>2021-06-05 23:10:04 -0600
committerBryson Steck <steck.bryson@gmail.com>2021-06-05 23:10:04 -0600
commite05c16e0a649356020dc1b05d38c4a73e709ce00 (patch)
treee84b3ff3019036b15a6fbbc3bb9e6e1edc2e6059 /src/net/brysonsteck/PlayerAttributes.java
downloadresurrection-e05c16e0a649356020dc1b05d38c4a73e709ce00.tar
resurrection-e05c16e0a649356020dc1b05d38c4a73e709ce00.tar.gz
resurrection-e05c16e0a649356020dc1b05d38c4a73e709ce00.tar.bz2
initial commit
Diffstat (limited to 'src/net/brysonsteck/PlayerAttributes.java')
-rw-r--r--src/net/brysonsteck/PlayerAttributes.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/net/brysonsteck/PlayerAttributes.java b/src/net/brysonsteck/PlayerAttributes.java
new file mode 100644
index 0000000..de8edcc
--- /dev/null
+++ b/src/net/brysonsteck/PlayerAttributes.java
@@ -0,0 +1,24 @@
+package net.brysonsteck;
+
+import org.bukkit.ChatColor;
+import org.bukkit.entity.Player;
+import org.bukkit.event.Listener;
+import org.bukkit.event.entity.PlayerDeathEvent;
+import org.bukkit.plugin.Plugin;
+
+public class PlayerAttributes implements Listener {
+ public Plugin plugin = Resurrection.getPlugin(Resurrection.class);
+
+ public void onDeath(PlayerDeathEvent event) {
+ Player p = event.getEntity();
+ Player k = event.getEntity().getKiller();
+ int killcount = plugin.getConfig().getInt("Users." + k.getUniqueId().toString() + ".Kills") ;
+ int deathcount = plugin.getConfig().getInt("Users." + p.getUniqueId().toString() + ".Deaths") ;
+
+ plugin.getConfig().set("Users." + p.getUniqueId().toString() + ".Deaths", deathcount + 1);
+ plugin.getConfig().set("Users." + k.getUniqueId().toString() + ".Kills", killcount + 1);
+ plugin.saveConfig();
+
+
+ }
+} \ No newline at end of file