mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 01:37:37 +00:00
Added a workaround for hey0's getComplexBlock() returning a null when it should not.
This commit is contained in:
parent
ed2859c1de
commit
263417550b
@ -81,6 +81,9 @@ public class SMServerInterface implements ServerInterface {
|
|||||||
public void setSignText(Vector pt, String[] text) {
|
public void setSignText(Vector pt, String[] text) {
|
||||||
Sign signData = (Sign)etc.getServer().getComplexBlock(
|
Sign signData = (Sign)etc.getServer().getComplexBlock(
|
||||||
pt.getBlockX(), pt.getBlockY(), pt.getBlockZ());
|
pt.getBlockX(), pt.getBlockY(), pt.getBlockZ());
|
||||||
|
if (signData == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
for (byte i = 0; i < 4; i++) {
|
for (byte i = 0; i < 4; i++) {
|
||||||
signData.setText(i, text[i]);
|
signData.setText(i, text[i]);
|
||||||
}
|
}
|
||||||
@ -96,6 +99,9 @@ public class SMServerInterface implements ServerInterface {
|
|||||||
public String[] getSignText(Vector pt) {
|
public String[] getSignText(Vector pt) {
|
||||||
Sign signData = (Sign)etc.getServer().getComplexBlock(
|
Sign signData = (Sign)etc.getServer().getComplexBlock(
|
||||||
pt.getBlockX(), pt.getBlockY(), pt.getBlockZ());
|
pt.getBlockX(), pt.getBlockY(), pt.getBlockZ());
|
||||||
|
if (signData == null) {
|
||||||
|
return new String[]{"", "", "", ""};
|
||||||
|
}
|
||||||
String[] text = new String[4];
|
String[] text = new String[4];
|
||||||
for (byte i = 0; i < 4; i++) {
|
for (byte i = 0; i < 4; i++) {
|
||||||
text[i] = signData.getText(i);
|
text[i] = signData.getText(i);
|
||||||
|
Loading…
Reference in New Issue
Block a user