aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.idea/.gitignore3
-rw-r--r--.idea/.name1
-rw-r--r--.idea/description.html1
-rw-r--r--.idea/encodings.xml7
-rw-r--r--.idea/libraries/spigot_api_1_16_5_R0_1_20210524_223338_87.xml9
-rw-r--r--.idea/misc.xml12
-rw-r--r--.idea/modules.xml8
-rw-r--r--.idea/project-template.xml3
-rw-r--r--.idea/uiDesigner.xml124
-rw-r--r--Resurrection.iml12
-rw-r--r--data/player.data1
-rw-r--r--lib/spigot-api-1.16.5-R0.1-20210524.223338-87.jarbin0 -> 1307220 bytes
-rw-r--r--out/production/DeadForADay/net/brysonsteck/DeadForADay.classbin0 -> 1840 bytes
-rw-r--r--out/production/DeadForADay/net/brysonsteck/PlayerData.classbin0 -> 1749 bytes
-rw-r--r--out/production/DeadForADay/net/brysonsteck/plugin.yml0
-rw-r--r--out/production/Resurrection/net/brysonsteck/PlayerData.classbin0 -> 2006 bytes
-rw-r--r--out/production/Resurrection/net/brysonsteck/Resurrection.classbin0 -> 818 bytes
-rw-r--r--out/production/Resurrection/net/brysonsteck/plugin.yml0
-rw-r--r--src/net/brysonsteck/PlayerAttributes.java24
-rw-r--r--src/net/brysonsteck/PlayerData.java46
-rw-r--r--src/net/brysonsteck/Resurrection.java44
-rw-r--r--src/net/brysonsteck/plugin.yml0
22 files changed, 295 insertions, 0 deletions
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..26d3352
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml
diff --git a/.idea/.name b/.idea/.name
new file mode 100644
index 0000000..d956a6b
--- /dev/null
+++ b/.idea/.name
@@ -0,0 +1 @@
+Resurrection \ No newline at end of file
diff --git a/.idea/description.html b/.idea/description.html
new file mode 100644
index 0000000..db5f129
--- /dev/null
+++ b/.idea/description.html
@@ -0,0 +1 @@
+<html>Simple <b>Java</b> application that includes a class with <code>main()</code> method</html> \ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
new file mode 100644
index 0000000..7b0d571
--- /dev/null
+++ b/.idea/encodings.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="Encoding">
+ <file url="file://$PROJECT_DIR$/data/player.data" charset="UTF-8" />
+ <file url="PROJECT" charset="UTF-8" />
+ </component>
+</project> \ No newline at end of file
diff --git a/.idea/libraries/spigot_api_1_16_5_R0_1_20210524_223338_87.xml b/.idea/libraries/spigot_api_1_16_5_R0_1_20210524_223338_87.xml
new file mode 100644
index 0000000..7b4affa
--- /dev/null
+++ b/.idea/libraries/spigot_api_1_16_5_R0_1_20210524_223338_87.xml
@@ -0,0 +1,9 @@
+<component name="libraryTable">
+ <library name="spigot-api-1.16.5-R0.1-20210524.223338-87">
+ <CLASSES>
+ <root url="jar://$PROJECT_DIR$/lib/spigot-api-1.16.5-R0.1-20210524.223338-87.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+</component> \ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..cf79644
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="EntryPointsManager">
+ <entry_points version="2.0" />
+ </component>
+ <component name="ProjectKey">
+ <option name="state" value="project://e2804f05-5315-4fc6-a121-c522a6c26470" />
+ </component>
+ <component name="ProjectRootManager" version="2" languageLevel="JDK_15" default="true" project-jdk-name="openjdk-15" project-jdk-type="JavaSDK">
+ <output url="file://$PROJECT_DIR$/out" />
+ </component>
+</project> \ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..ad84213
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="ProjectModuleManager">
+ <modules>
+ <module fileurl="file://$PROJECT_DIR$/Resurrection.iml" filepath="$PROJECT_DIR$/Resurrection.iml" />
+ </modules>
+ </component>
+</project> \ No newline at end of file
diff --git a/.idea/project-template.xml b/.idea/project-template.xml
new file mode 100644
index 0000000..1f08b88
--- /dev/null
+++ b/.idea/project-template.xml
@@ -0,0 +1,3 @@
+<template>
+ <input-field default="com.company">IJ_BASE_PACKAGE</input-field>
+</template> \ No newline at end of file
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
new file mode 100644
index 0000000..e96534f
--- /dev/null
+++ b/.idea/uiDesigner.xml
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="Palette2">
+ <group name="Swing">
+ <item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
+ </item>
+ <item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
+ </item>
+ <item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
+ </item>
+ <item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
+ <default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
+ </item>
+ <item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
+ <initial-values>
+ <property name="text" value="Button" />
+ </initial-values>
+ </item>
+ <item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
+ <initial-values>
+ <property name="text" value="RadioButton" />
+ </initial-values>
+ </item>
+ <item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
+ <initial-values>
+ <property name="text" value="CheckBox" />
+ </initial-values>
+ </item>
+ <item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
+ <initial-values>
+ <property name="text" value="Label" />
+ </initial-values>
+ </item>
+ <item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+ <preferred-size width="150" height="-1" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+ <preferred-size width="150" height="-1" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+ <preferred-size width="150" height="-1" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+ <preferred-size width="150" height="50" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+ <preferred-size width="150" height="50" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+ <preferred-size width="150" height="50" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
+ </item>
+ <item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+ <preferred-size width="150" height="50" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
+ <preferred-size width="150" height="50" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+ <preferred-size width="150" height="50" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
+ <preferred-size width="200" height="200" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
+ <preferred-size width="200" height="200" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
+ </item>
+ <item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
+ </item>
+ <item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
+ </item>
+ <item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
+ </item>
+ <item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
+ <preferred-size width="-1" height="20" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
+ </item>
+ <item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
+ </item>
+ </group>
+ </component>
+</project> \ No newline at end of file
diff --git a/Resurrection.iml b/Resurrection.iml
new file mode 100644
index 0000000..e940e50
--- /dev/null
+++ b/Resurrection.iml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+ <component name="NewModuleRootManager" inherit-compiler-output="true">
+ <exclude-output />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
+ </content>
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="library" name="spigot-api-1.16.5-R0.1-20210524.223338-87" level="project" />
+ </component>
+</module> \ No newline at end of file
diff --git a/data/player.data b/data/player.data
new file mode 100644
index 0000000..d5d4ef7
--- /dev/null
+++ b/data/player.data
@@ -0,0 +1 @@
+username,false,0 \ No newline at end of file
diff --git a/lib/spigot-api-1.16.5-R0.1-20210524.223338-87.jar b/lib/spigot-api-1.16.5-R0.1-20210524.223338-87.jar
new file mode 100644
index 0000000..75fba07
--- /dev/null
+++ b/lib/spigot-api-1.16.5-R0.1-20210524.223338-87.jar
Binary files differ
diff --git a/out/production/DeadForADay/net/brysonsteck/DeadForADay.class b/out/production/DeadForADay/net/brysonsteck/DeadForADay.class
new file mode 100644
index 0000000..6fe8bca
--- /dev/null
+++ b/out/production/DeadForADay/net/brysonsteck/DeadForADay.class
Binary files differ
diff --git a/out/production/DeadForADay/net/brysonsteck/PlayerData.class b/out/production/DeadForADay/net/brysonsteck/PlayerData.class
new file mode 100644
index 0000000..978e898
--- /dev/null
+++ b/out/production/DeadForADay/net/brysonsteck/PlayerData.class
Binary files differ
diff --git a/out/production/DeadForADay/net/brysonsteck/plugin.yml b/out/production/DeadForADay/net/brysonsteck/plugin.yml
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/out/production/DeadForADay/net/brysonsteck/plugin.yml
diff --git a/out/production/Resurrection/net/brysonsteck/PlayerData.class b/out/production/Resurrection/net/brysonsteck/PlayerData.class
new file mode 100644
index 0000000..3b9818b
--- /dev/null
+++ b/out/production/Resurrection/net/brysonsteck/PlayerData.class
Binary files differ
diff --git a/out/production/Resurrection/net/brysonsteck/Resurrection.class b/out/production/Resurrection/net/brysonsteck/Resurrection.class
new file mode 100644
index 0000000..2adf2d9
--- /dev/null
+++ b/out/production/Resurrection/net/brysonsteck/Resurrection.class
Binary files differ
diff --git a/out/production/Resurrection/net/brysonsteck/plugin.yml b/out/production/Resurrection/net/brysonsteck/plugin.yml
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/out/production/Resurrection/net/brysonsteck/plugin.yml
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
diff --git a/src/net/brysonsteck/PlayerData.java b/src/net/brysonsteck/PlayerData.java
new file mode 100644
index 0000000..556c147
--- /dev/null
+++ b/src/net/brysonsteck/PlayerData.java
@@ -0,0 +1,46 @@
+package net.brysonsteck;
+
+import java.io.*;
+import java.util.Arrays;
+import java.util.Hashtable;
+
+public class PlayerData {
+ Hashtable<String, Hashtable<String, String>> playerData = new Hashtable<>();
+
+ public void saveData(String write) {
+ try {
+ FileWriter writer = new FileWriter("data/player.data");
+ writer.write(write);
+ writer.close();
+ readData();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void readData() {
+ try {
+ BufferedReader reader = new BufferedReader(new FileReader("data/player.data"));
+ String line = "";
+ String[] playerData;
+ while (true) {
+ playerData = new String[3];
+ line = reader.readLine();
+ if (line == null) {
+ break;
+ }
+ playerData = line.split(",");
+ Hashtable<String, String> playerHash = new Hashtable<>();
+ playerHash.put("dead", playerData[1]);
+ playerHash.put("timeLeft", playerData[2]);
+ this.playerData.put(playerData[0], playerHash);
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public Hashtable<String, Hashtable<String, String>> getPlayers() {
+ return playerData;
+ }
+}
diff --git a/src/net/brysonsteck/Resurrection.java b/src/net/brysonsteck/Resurrection.java
new file mode 100644
index 0000000..c4553e8
--- /dev/null
+++ b/src/net/brysonsteck/Resurrection.java
@@ -0,0 +1,44 @@
+package net.brysonsteck;
+
+import org.bukkit.event.player.PlayerRespawnEvent;
+import org.bukkit.plugin.Plugin;
+import org.bukkit.plugin.java.JavaPlugin;
+
+import java.io.*;
+import java.nio.Buffer;
+
+public class Resurrection extends JavaPlugin {
+ public Plugin plugin = getPlugin(Resurrection.class);
+
+ //spigot things
+ @Override
+ public void onDisable() {
+ super.onDisable();
+ }
+
+ @Override
+ public void onEnable() {
+ super.onEnable();
+
+ }
+
+ // end of spigot things
+ public static void main(String[] args) {
+// PlayerData playerData = new PlayerData();
+// playerData.saveData("This is the first line\nthis is the second line");
+// System.out.println(playerData.getPlayers());
+// playerData.readData();
+
+// playerData.saveData("username,false,0");
+// System.out.println("now adding two more lines");
+// playerData.saveData(playerData.getPlayers() + "this is the third line\nthis is the fourth line\nthe thread is now sleeping\nonce more\nand again");
+// System.out.println(playerData.getPlayers());
+// try {
+// Thread.sleep(100000);
+// } catch (InterruptedException e) {
+// e.printStackTrace();
+// }
+
+ }
+
+}
diff --git a/src/net/brysonsteck/plugin.yml b/src/net/brysonsteck/plugin.yml
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/net/brysonsteck/plugin.yml