Java Code Examples for org.bukkit.entity.Player#setCollidesWithEntities()

The following examples show how to use org.bukkit.entity.Player#setCollidesWithEntities() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MatchPlayer.java    From ProjectAres with GNU Affero General Public License v3.0 5 votes vote down vote up
public void refreshInteraction() {
    final Player bukkit = getBukkit();
    boolean interact = canInteract();
    if(!interact) bukkit.leaveVehicle();
    bukkit.setAffectsSpawning(interact);
    bukkit.setCollidesWithEntities(interact);
}
 
Example 2
Source File: Players.java    From CardinalPGM with MIT License 4 votes vote down vote up
public static void canInteract(Player player, boolean state) {
    player.setAffectsSpawning(state);
    player.setCollidesWithEntities(state);
    player.setCanPickupItems(state);
}