@@ -28,7 +28,7 @@ internal object PylonItemListener : Listener {
2828 event.isCancelled = true
2929 return
3030 }
31- if (bow is Bow ) {
31+ if (bow is PylonBow ) {
3232 bow.onBowReady(event)
3333 }
3434
@@ -37,20 +37,20 @@ internal object PylonItemListener : Listener {
3737 event.isCancelled = true
3838 return
3939 }
40- if (arrow is Arrow ) {
40+ if (arrow is PylonArrow ) {
4141 arrow.onArrowReady(event)
4242 }
4343 }
4444
4545 @EventHandler
4646 private fun handle (event : EntityShootBowEvent ) {
4747 val bow = event.bow?.let { PylonItem .fromStack(it) }
48- if (bow is Bow ) {
48+ if (bow is PylonBow ) {
4949 bow.onBowFired(event)
5050 }
5151
5252 val arrow = event.consumable?.let { PylonItem .fromStack(it) }
53- if (arrow is Arrow ) {
53+ if (arrow is PylonArrow ) {
5454 arrow.onArrowShotFromBow(event)
5555 }
5656 }
@@ -63,22 +63,22 @@ internal object PylonItemListener : Listener {
6363 return
6464 }
6565 if (
66- pylonItem is Cooldownable &&
66+ pylonItem is PylonCooldownable &&
6767 event.player.getCooldown(pylonItem.stack) > 0 &&
6868 pylonItem.respectCooldown
6969 ) return
70- if (pylonItem is BlockInteractor && event.hasBlock()) {
70+ if (pylonItem is PylonBlockInteractor && event.hasBlock()) {
7171 pylonItem.onUsedToClickBlock(event)
7272 }
73- if (pylonItem is Interactor ) {
73+ if (pylonItem is PylonInteractor ) {
7474 pylonItem.onUsedToRightClick(event)
7575 }
7676 }
7777
7878 @EventHandler
7979 private fun handle (event : BrewingStandFuelEvent ) {
8080 val pylonItem = PylonItem .fromStack(event.fuel)
81- if (pylonItem is BrewingStandFuel ) {
81+ if (pylonItem is PylonBrewingStandFuel ) {
8282 pylonItem.onUsedAsBrewingStandFuel(event)
8383 }
8484 }
@@ -90,7 +90,7 @@ internal object PylonItemListener : Listener {
9090 event.isCancelled = true
9191 return
9292 }
93- if (pylonItem is Bucket ) {
93+ if (pylonItem is PylonBucket ) {
9494 pylonItem.onBucketEmptied(event)
9595 }
9696 }
@@ -102,7 +102,7 @@ internal object PylonItemListener : Listener {
102102 event.isCancelled = true
103103 return
104104 }
105- if (pylonItem is Bucket ) {
105+ if (pylonItem is PylonBucket ) {
106106 pylonItem.onBucketFilled(event)
107107 }
108108 }
@@ -114,7 +114,7 @@ internal object PylonItemListener : Listener {
114114 event.isCancelled = true
115115 return
116116 }
117- if (pylonItem is Consumable ) {
117+ if (pylonItem is PylonConsumable ) {
118118 pylonItem.onConsumed(event)
119119 }
120120 }
@@ -125,7 +125,7 @@ internal object PylonItemListener : Listener {
125125 if (pylonItem != null && ! event.player.canUse(pylonItem, true )) {
126126 return
127127 }
128- if (pylonItem is Damageable ) {
128+ if (pylonItem is PylonItemDamageable ) {
129129 pylonItem.onItemDamaged(event)
130130 }
131131 }
@@ -136,7 +136,7 @@ internal object PylonItemListener : Listener {
136136 if (pylonItem != null && ! event.player.canUse(pylonItem, true )) {
137137 return
138138 }
139- if (pylonItem is Damageable ) {
139+ if (pylonItem is PylonItemDamageable ) {
140140 pylonItem.onItemBreaks(event)
141141 }
142142 }
@@ -148,7 +148,7 @@ internal object PylonItemListener : Listener {
148148 event.isCancelled = true
149149 return
150150 }
151- if (pylonItem is Damageable && event.player.canUse(pylonItem, true )) {
151+ if (pylonItem is PylonItemDamageable && event.player.canUse(pylonItem, true )) {
152152 pylonItem.onItemMended(event)
153153 }
154154 }
@@ -160,7 +160,7 @@ internal object PylonItemListener : Listener {
160160 event.isCancelled = true
161161 return
162162 }
163- if (pylonItemMainHand is EntityInteractor &&
163+ if (pylonItemMainHand is PylonItemEntityInteractor &&
164164 ! (event.player.getCooldown(pylonItemMainHand.stack) > 0 && pylonItemMainHand.respectCooldown)
165165 ) {
166166 pylonItemMainHand.onUsedToRightClickEntity(event)
@@ -171,7 +171,7 @@ internal object PylonItemListener : Listener {
171171 event.isCancelled = true
172172 return
173173 }
174- if (pylonItemOffHand is EntityInteractor &&
174+ if (pylonItemOffHand is PylonItemEntityInteractor &&
175175 ! (event.player.getCooldown(pylonItemOffHand.stack) > 0 && pylonItemOffHand.respectCooldown)
176176 ) {
177177 pylonItemOffHand.onUsedToRightClickEntity(event)
@@ -195,7 +195,7 @@ internal object PylonItemListener : Listener {
195195 event.isCancelled = true
196196 return
197197 }
198- if (pylonItem is Tool ) {
198+ if (pylonItem is PylonTool ) {
199199 pylonItem.onUsedToDamageBlock(event)
200200 }
201201 }
@@ -207,7 +207,7 @@ internal object PylonItemListener : Listener {
207207 event.isCancelled = true
208208 return
209209 }
210- if (pylonItemMainHand is Tool ) {
210+ if (pylonItemMainHand is PylonTool ) {
211211 pylonItemMainHand.onUsedToBreakBlock(event)
212212 }
213213
@@ -216,7 +216,7 @@ internal object PylonItemListener : Listener {
216216 event.isCancelled = true
217217 return
218218 }
219- if (pylonItemOffHand is Tool ) {
219+ if (pylonItemOffHand is PylonTool ) {
220220 pylonItemOffHand.onUsedToBreakBlock(event)
221221 }
222222 }
@@ -231,7 +231,7 @@ internal object PylonItemListener : Listener {
231231 event.isCancelled = true
232232 return
233233 }
234- if (pylonItemMainHand is Weapon ) {
234+ if (pylonItemMainHand is PylonWeapon ) {
235235 pylonItemMainHand.onUsedToDamageEntity(event)
236236 }
237237
@@ -240,7 +240,7 @@ internal object PylonItemListener : Listener {
240240 event.isCancelled = true
241241 return
242242 }
243- if (pylonItemOffHand is Weapon ) {
243+ if (pylonItemOffHand is PylonWeapon ) {
244244 pylonItemOffHand.onUsedToDamageEntity(event)
245245 }
246246 }
@@ -256,7 +256,7 @@ internal object PylonItemListener : Listener {
256256 event.isCancelled = true
257257 return
258258 }
259- if (pylonItemMainHand is Weapon ) {
259+ if (pylonItemMainHand is PylonWeapon ) {
260260 pylonItemMainHand.onUsedToKillEntity(event)
261261 }
262262
@@ -265,7 +265,7 @@ internal object PylonItemListener : Listener {
265265 event.isCancelled = true
266266 return
267267 }
268- if (pylonItemOffHand is Weapon ) {
268+ if (pylonItemOffHand is PylonWeapon ) {
269269 pylonItemOffHand.onUsedToKillEntity(event)
270270 }
271271 }
0 commit comments