cn.nukkit.AdventureSettings Java Examples
The following examples show how to use
cn.nukkit.AdventureSettings.
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: NukkitPlayer.java From FastAsyncWorldedit with GNU General Public License v3.0 | 5 votes |
@Override public void floatAt(int x, int y, int z, boolean alwaysGlass) { if (alwaysGlass || !player.getAllowFlight()) { super.floatAt(x, y, z, alwaysGlass); return; } setPosition(new Vector(x + 0.5, y, z + 0.5)); player.getAdventureSettings().set(AdventureSettings.Type.ALLOW_FLIGHT, true); player.getAdventureSettings().set(AdventureSettings.Type.FLYING, true); player.getAdventureSettings().update(); }
Example #2
Source File: PlayerGameModeChangeEvent.java From Jupiter with GNU General Public License v3.0 | 4 votes |
public PlayerGameModeChangeEvent(Player player, int newGameMode, AdventureSettings newAdventureSettings) { this.player = player; this.gamemode = newGameMode; this.newAdventureSettings = newAdventureSettings; }
Example #3
Source File: PlayerGameModeChangeEvent.java From Jupiter with GNU General Public License v3.0 | 4 votes |
public AdventureSettings getNewAdventureSettings() { return newAdventureSettings; }
Example #4
Source File: PlayerGameModeChangeEvent.java From Jupiter with GNU General Public License v3.0 | 4 votes |
public void setNewAdventureSettings(AdventureSettings newAdventureSettings) { this.newAdventureSettings = newAdventureSettings; }
Example #5
Source File: PlayerGameModeChangeEvent.java From Nukkit with GNU General Public License v3.0 | 4 votes |
public PlayerGameModeChangeEvent(Player player, int newGameMode, AdventureSettings newAdventureSettings) { this.player = player; this.gamemode = newGameMode; this.newAdventureSettings = newAdventureSettings; }
Example #6
Source File: PlayerGameModeChangeEvent.java From Nukkit with GNU General Public License v3.0 | 4 votes |
public AdventureSettings getNewAdventureSettings() { return newAdventureSettings; }
Example #7
Source File: PlayerGameModeChangeEvent.java From Nukkit with GNU General Public License v3.0 | 4 votes |
public void setNewAdventureSettings(AdventureSettings newAdventureSettings) { this.newAdventureSettings = newAdventureSettings; }
Example #8
Source File: EssentialsAPI.java From EssentialsNK with GNU General Public License v3.0 | 4 votes |
public boolean canFly(Player player) { return player.getAdventureSettings().get(AdventureSettings.Type.ALLOW_FLIGHT); }
Example #9
Source File: EssentialsAPI.java From EssentialsNK with GNU General Public License v3.0 | 4 votes |
public void setCanFly(Player player, boolean canFly) { player.getAdventureSettings().set(AdventureSettings.Type.ALLOW_FLIGHT, canFly); player.getAdventureSettings().update(); }
Example #10
Source File: PlayerGameModeChangeEvent.java From Nukkit with GNU General Public License v3.0 | 4 votes |
public PlayerGameModeChangeEvent(Player player, int newGameMode, AdventureSettings newAdventureSettings) { this.player = player; this.gamemode = newGameMode; this.newAdventureSettings = newAdventureSettings; }
Example #11
Source File: PlayerGameModeChangeEvent.java From Nukkit with GNU General Public License v3.0 | 4 votes |
public AdventureSettings getNewAdventureSettings() { return newAdventureSettings; }
Example #12
Source File: PlayerGameModeChangeEvent.java From Nukkit with GNU General Public License v3.0 | 4 votes |
public void setNewAdventureSettings(AdventureSettings newAdventureSettings) { this.newAdventureSettings = newAdventureSettings; }