Per-world Creeper settings complete
- Added per-world Block Damage settings - Added per-world Entity Damage settings - Added creeper_settings database support - Added world-specific Creeper menus - Added automatic world registration/default inheritance - Split Creeper listeners - Updated Creeper behavior to use world settings - Removed obsolete global Creeper indicators - Adopted logger-based error reporting standard
This commit is contained in:
1 parent
ebf030b192
commit
73a0ef8ae6
23 files changed
+1203
-73
No files matched your search
@@ -0,0 +1,73 @@
|
||||
package com.rsscripting.serveradmin.menuholder;
|
||||
|
||||
import org.bukkit.inventory.Inventory;
|
||||
import org.bukkit.inventory.InventoryHolder;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class RSMenuHolder
|
||||
implements InventoryHolder {
|
||||
|
||||
private final String menuId;
|
||||
|
||||
private int page = 1;
|
||||
|
||||
private String worldName;
|
||||
|
||||
public RSMenuHolder(
|
||||
String menuId
|
||||
) {
|
||||
|
||||
this.menuId = menuId;
|
||||
|
||||
}
|
||||
|
||||
public String getMenuId() {
|
||||
|
||||
return menuId;
|
||||
|
||||
}
|
||||
|
||||
public int getPage() {
|
||||
|
||||
return page;
|
||||
|
||||
}
|
||||
|
||||
public void setPage(
|
||||
int page
|
||||
) {
|
||||
|
||||
if (page < 1) {
|
||||
|
||||
page = 1;
|
||||
|
||||
}
|
||||
|
||||
this.page = page;
|
||||
|
||||
}
|
||||
|
||||
public String getWorldName() {
|
||||
|
||||
return worldName;
|
||||
|
||||
}
|
||||
|
||||
public void setWorldName(
|
||||
String worldName
|
||||
) {
|
||||
|
||||
this.worldName = worldName;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull Inventory getInventory() {
|
||||
|
||||
throw new UnsupportedOperationException(
|
||||
"RSMenuHolder does not store an inventory."
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user