@jsprismarine/prismarine
Version:
Dedicated Minecraft Bedrock Edition server written in TypeScript
43 lines • 1.4 kB
TypeScript
import { default as Server } from '../Server';
export declare const GameRules: {
CommandBlockOutput: string;
DoDayLightCycle: string;
DoEntityDrops: string;
DoFireTick: string;
DoMobLoot: string;
DoMobSpawning: string;
DoTileDrops: string;
DoWeatherCycle: string;
DrowingDamage: string;
FallDamage: string;
FireDamage: string;
KeepInventory: string;
MobGriefing: string;
NaturalRegeneration: string;
PVP: string;
ShowCoordinates: string;
RandomTickSpeed: string;
TNTExplodes: string;
sendCommandFeedback: string;
};
export default class GameruleManager {
private readonly server;
private readonly rules;
constructor(server: Server);
/**
* Sets a game rule.
* @param {string} name - the gamerule's name.
* @param {boolean | number} value - the value, boolean OR number.
* @param {boolean} editable - if the gamerule is editable.
* @TODO: notify clients about gamerule change.
*/
setGamerule(name: string, value: boolean | number, editable: boolean): void;
/**
* Returns the gamerule value.
* @param {string} name - the gamerule's name.
*/
getGamerule(name: string): [number | boolean, boolean] | null;
getGamerules(): Map<string, [number | boolean, boolean]>;
networkSerialize(stream: any): void;
}
//# sourceMappingURL=GameruleManager.d.ts.map