Fixed crash when Destructor tries to break secured network block
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
- Fixed "Clear" and "Create Pattern" buttons not working correctly when using Grid Filter tabs (raoulvdberge)
|
||||
- Fixed Wrench in Dismantling Mode voiding Storage Block contents (raoulvdberge)
|
||||
- Fixed OPs not having global permissions on secured storage systems (raoulvdberge)
|
||||
- Fixed crash when Destructor tries to break secured network block (raoulvdberge)
|
||||
|
||||
### 1.4
|
||||
- Added Security Manager (raoulvdberge)
|
||||
|
||||
@@ -327,6 +327,13 @@ public final class RSUtils {
|
||||
}
|
||||
|
||||
public static void sendNoPermissionMessage(EntityPlayer player) {
|
||||
// When a fake player isn't allowed to do something, we can't send a no permission message because there is no connection associated to the fake player.
|
||||
// For example when a Destructor is attempting to break a network block on a secured network with the fake player.
|
||||
// So, we first check if there is a connection.
|
||||
if (player instanceof EntityPlayerMP && ((EntityPlayerMP) player).connection == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
player.sendMessage(new TextComponentTranslation("misc.refinedstorage:security.no_permission").setStyle(new Style().setColor(TextFormatting.RED)));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user