mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Feature: Allow client-side "game settings" menu gamemode/difficulty changes (#4062)
Removes difficulty/Gamemode settings from the custom server settings form since these are now present in the client side settings.
This commit is contained in:
parent
007edcbf11
commit
806ec35a84
10 changed files with 169 additions and 36 deletions
|
@ -25,6 +25,7 @@
|
|||
|
||||
package org.geysermc.geyser.platform.spigot.world.manager;
|
||||
|
||||
import com.github.steveice10.mc.protocol.data.game.entity.player.GameMode;
|
||||
import com.github.steveice10.mc.protocol.data.game.level.block.BlockEntityInfo;
|
||||
import com.github.steveice10.opennbt.tag.builtin.CompoundTag;
|
||||
import org.bukkit.Bukkit;
|
||||
|
@ -171,6 +172,11 @@ public class GeyserSpigotWorldManager extends WorldManager {
|
|||
return gameRule.getDefaultIntValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public GameMode getDefaultGameMode(GeyserSession session) {
|
||||
return GameMode.byId(Bukkit.getDefaultGameMode().ordinal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasPermission(GeyserSession session, String permission) {
|
||||
return Bukkit.getPlayer(session.getPlayerEntity().getUsername()).hasPermission(permission);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue