mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26:45 +01:00
Fixed fallback plotme conversion
This commit is contained in:
parent
d52e9b4c8c
commit
bd86caa818
@ -1,6 +1,9 @@
|
|||||||
package com.plotsquared.bukkit.database.plotme;
|
package com.plotsquared.bukkit.database.plotme;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.nio.ByteBuffer;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.sql.Blob;
|
||||||
import java.sql.Connection;
|
import java.sql.Connection;
|
||||||
import java.sql.DriverManager;
|
import java.sql.DriverManager;
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
@ -102,7 +105,16 @@ public class ClassicPlotMeConnector extends APlotMeConnector {
|
|||||||
try {
|
try {
|
||||||
byte[] bytes = r.getBytes("ownerid");
|
byte[] bytes = r.getBytes("ownerid");
|
||||||
if (bytes != null) {
|
if (bytes != null) {
|
||||||
owner = UUID.nameUUIDFromBytes(bytes);
|
try {
|
||||||
|
ByteBuffer bb = ByteBuffer.wrap(bytes);
|
||||||
|
long high = bb.getLong();
|
||||||
|
long low = bb.getLong();
|
||||||
|
owner = new UUID(high, low);
|
||||||
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
owner = UUID.nameUUIDFromBytes(bytes);
|
||||||
|
}
|
||||||
if (owner != null) {
|
if (owner != null) {
|
||||||
UUIDHandler.add(new StringWrapper(name), owner);
|
UUIDHandler.add(new StringWrapper(name), owner);
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,6 @@ import org.spongepowered.api.entity.player.Player;
|
|||||||
import org.spongepowered.api.entity.player.gamemode.GameMode;
|
import org.spongepowered.api.entity.player.gamemode.GameMode;
|
||||||
import org.spongepowered.api.entity.player.gamemode.GameModes;
|
import org.spongepowered.api.entity.player.gamemode.GameModes;
|
||||||
import org.spongepowered.api.text.Texts;
|
import org.spongepowered.api.text.Texts;
|
||||||
import org.spongepowered.api.text.chat.ChatType;
|
|
||||||
import org.spongepowered.api.text.chat.ChatTypes;
|
import org.spongepowered.api.text.chat.ChatTypes;
|
||||||
|
|
||||||
import com.flowpowered.math.vector.Vector3d;
|
import com.flowpowered.math.vector.Vector3d;
|
||||||
|
Loading…
Reference in New Issue
Block a user