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

@ -23,7 +23,7 @@
- Text
- Items
- Container (list with items, the inventory and their positions)
- GUI
- GUI
- Buttons
- TextField
- Label

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> {
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!" }
return
}
// Desktop.getDesktop().open(File(path))
try {
JavaFXUtil.HOST_SERVICES.showDocument(file.absolutePath)