|
19 | 19 | import com.landclaims.systems.BlockUseProtectionSystem; |
20 | 20 | import com.hypixel.hytale.server.core.plugin.JavaPlugin; |
21 | 21 | import com.hypixel.hytale.server.core.plugin.JavaPluginInit; |
22 | | -import com.hypixel.hytale.server.core.event.events.ecs.BreakBlockEvent; |
23 | | -import com.hypixel.hytale.server.core.event.events.ecs.DamageBlockEvent; |
24 | | -import com.hypixel.hytale.server.core.event.events.ecs.PlaceBlockEvent; |
25 | | -import com.hypixel.hytale.server.core.event.events.ecs.UseBlockEvent; |
26 | 22 |
|
27 | 23 | /** |
28 | 24 | * LandClaims - A chunk-based land claiming plugin with playtime-based limits. |
@@ -80,14 +76,7 @@ public void setup() { |
80 | 76 | // Register ECS block protection systems |
81 | 77 | getLogger().atInfo().log("Registering ECS block protection systems..."); |
82 | 78 | try { |
83 | | - // Register entity event types first - required before systems can receive these events |
84 | | - getEntityStoreRegistry().registerEntityEventType(DamageBlockEvent.class); |
85 | | - getEntityStoreRegistry().registerEntityEventType(BreakBlockEvent.class); |
86 | | - getEntityStoreRegistry().registerEntityEventType(PlaceBlockEvent.class); |
87 | | - getEntityStoreRegistry().registerEntityEventType(UseBlockEvent.Pre.class); |
88 | | - getLogger().atInfo().log("Registered entity event types"); |
89 | | - |
90 | | - // Now register the systems that handle these events |
| 79 | + // Event types are already registered by the core game, just register our systems |
91 | 80 | getEntityStoreRegistry().registerSystem(new BlockDamageProtectionSystem(claimManager, getLogger())); |
92 | 81 | getLogger().atInfo().log("Registered BlockDamageProtectionSystem"); |
93 | 82 | getEntityStoreRegistry().registerSystem(new BlockBreakProtectionSystem(claimManager, getLogger())); |
|
0 commit comments