forbid attacking of ItemEntity

This commit is contained in:
Bixilon 2022-09-29 19:53:40 +02:00
parent 81f3644565
commit 725bf8c159
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4
3 changed files with 5 additions and 2 deletions

View File

@ -56,6 +56,10 @@ class ItemEntity(connection: PlayConnection, entityType: EntityType, data: Entit
} }
} }
override fun onAttack(attacker: Entity): Boolean {
return false
}
companion object : EntityFactory<ItemEntity> { companion object : EntityFactory<ItemEntity> {
override val RESOURCE_LOCATION: ResourceLocation = ResourceLocation("item") override val RESOURCE_LOCATION: ResourceLocation = ResourceLocation("item")

View File

@ -49,7 +49,6 @@ object DesktopUtil {
Log.log(LogMessageType.GENERAL, LogLevels.INFO) { "Can not open file: $file: Eros is disabled!" } Log.log(LogMessageType.GENERAL, LogLevels.INFO) { "Can not open file: $file: Eros is disabled!" }
return return
} }
// Desktop.getDesktop().open(File(path))
try { try {
JavaFXUtil.HOST_SERVICES.showDocument(file.absolutePath) JavaFXUtil.HOST_SERVICES.showDocument(file.absolutePath)