-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add minecart visual, change curved rail behavior
Signed-off-by: Pablete1234 <[email protected]>
- Loading branch information
1 parent
9cefcb6
commit eb25595
Showing
6 changed files
with
137 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package tc.oc.pgm.payload; | ||
|
||
import org.bukkit.event.EventHandler; | ||
import org.bukkit.event.Listener; | ||
import org.bukkit.event.vehicle.VehicleDamageEvent; | ||
import org.bukkit.event.vehicle.VehicleDestroyEvent; | ||
import org.bukkit.event.vehicle.VehicleEnterEvent; | ||
|
||
public class PayloadListener implements Listener { | ||
|
||
@EventHandler | ||
public void onVehicleDamage(final VehicleDamageEvent event) { | ||
if (Payload.isPayload(event.getVehicle())) event.setCancelled(true); | ||
} | ||
|
||
@EventHandler | ||
public void onVehicleEnter(final VehicleEnterEvent event) { | ||
if (Payload.isPayload(event.getVehicle())) event.setCancelled(true); | ||
} | ||
|
||
@EventHandler | ||
public void onVehicleDestroy(final VehicleDestroyEvent event) { | ||
if (Payload.isPayload(event.getVehicle())) event.setCancelled(true); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters