Commit v9.0.1 to git? - Type id is always 0 on field place.
Psithief opened this issue ยท 5 comments
I'm trying to find out why type_id is always being recorded as 0
in the ps_fields
table, but v9 isn't even on here for me to look at.
Will PS be committed here soon?
Edit See reopen comment - still no luck.
[Removed]
The issue occurs with all of the fields, not just the one using block-data.
Regarding the one using block data, the data
field is saved just fine.
I'd reopen #265 if I could.
I'm using v9.0.1 and the type_id is still being saved as zero when I place a force field.
[Removed - irrelevant]
Oh. There it is..at least in 9.0.0.
StorageManager.insertField
String query = "INSERT INTO `pstone_fields` ( `x`, `y`, `z`, `world`, `radius`, `height`, `velocity`, `type_id`, `data`, `owner`, `name`, `packed_allowed`, `last_used`, `flags`) ";
String values = "VALUES ( " + field.getX() + "," + field.getY() + "," + field.getZ() + ",'" + Helper.escapeQuotes(field.getWorld()) + "'," + field.getRadius() + "," + field.getHeight() + "," + field.getVelocity() + "," + field.getId() + "," + field.getData() + ",'" + field.getOwner() + "','" + Helper.escapeQuotes(field.getName()) + "','" + Helper.escapeQuotes(field.getPackedAllowed()) + "','" + (new Date()).getTime() + "','" + Helper.escapeQuotes(field.getFlagsAsString()) + "');";
I believe field.getId()
was supposed to be field.getTypeId()
.