Restore retained native menu facade and safe service navigation
This commit is contained in:
parent
6807bbcdde
commit
ea16e0e93d
1 changed files with 231 additions and 19 deletions
|
|
@ -0,0 +1,11 @@
|
|||
package com.dunerealms.menus;
|
||||
import java.util.Set;import org.bukkit.entity.Player;
|
||||
/** Only the presentation changes; original JARVIS/native service callbacks own behaviour. */
|
||||
final class NativeServiceMenu extends Menu {
|
||||
static final Set<String> IDS=Set.of("hub","travel","exchange","clan","company","missions","spice","war","politics","lore","mentat","house","equipment");
|
||||
private final String target;
|
||||
NativeServiceMenu(DuneMenusPlugin plugin,Player player,Menu parent,String target){super(plugin,player,parent);this.target=target;}
|
||||
@Override boolean launchNative(){plugin.openNativeService(player,target);return true;}
|
||||
String id(){return target;}Skin skin(){return Skin.GOLD;}String title(){return "Imperial services";}int rows(){return 6;}
|
||||
void draw(){throw new IllegalStateException("Native service presentation required");}
|
||||
}
|
||||
Loading…
Reference in a new issue

Staff