Skip to content

Commit

Permalink
More unnecessary files
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladg24YT committed Jul 15, 2022
1 parent 1b194a4 commit 6e0c207
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 277 deletions.
246 changes: 0 additions & 246 deletions src/main/java/org/bukkit/WorldCreator.java

This file was deleted.

32 changes: 1 addition & 31 deletions src/main/java/org/bukkit/util/Vector.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.configuration.serialization.ConfigurationSerializable;

import java.util.LinkedHashMap;
import java.util.Map;
Expand All @@ -16,7 +15,7 @@
*
* @author sk89q
*/
public class Vector implements Cloneable, ConfigurationSerializable {
public class Vector implements Cloneable {
private static final long serialVersionUID = -2657651106777219169L;

private static Random random = new Random();
Expand Down Expand Up @@ -634,33 +633,4 @@ public static Vector getMaximum(Vector v1, Vector v2) {
public static Vector getRandom() {
return new Vector(random.nextDouble(), random.nextDouble(), random.nextDouble());
}

// UPDATE 1.0.5
public Map<String, Object> serialize() {
Map<String, Object> result = new LinkedHashMap<String, Object>();

result.put("x", getX());
result.put("y", getY());
result.put("z", getZ());

return result;
}

public static Vector deserialize(Map<String, Object> args) {
double x = 0;
double y = 0;
double z = 0;

if (args.containsKey("x")) {
x = (Double) args.get("x");
}
if (args.containsKey("y")) {
y = (Double) args.get("y");
}
if (args.containsKey("z")) {
z = (Double) args.get("z");
}

return new Vector(x, y, z);
}
}

0 comments on commit 6e0c207

Please sign in to comment.