Skip to content

EmpireWar/Orbis

Repository files navigation

Orbis Logo

Modern region protection plugin for Minecraft: Java Edition.


Discord

Warning

Orbis is still in early stages of development. There will likely be protection bypasses and other bugs. Please report any bugs or issues to the GitHub. If there is a feature you would like to see, please open an issue.

Orbis is a modern region protection plugin for Minecraft, supporting the latest version and most platforms: Paper, Fabric, NeoForge, and Sponge.

Important

Orbis is not compatible with Spigot. Please use Paper instead.

What makes Orbis different?

These are the key features that makes Orbis stand out against other region protection plugins:

  • Modern, user-friendly interface/commands.
  • Support for Cuboids, Polygons, Polyhedrons, and Spherical region area types.
  • Region and selection visualisation using particles for all region types.
  • Multi-platform support for Paper, Fabric, NeoForge and Sponge.
  • Advanced API that lets you perform a set of queries on a world or region.
  • No external dependencies.

Migrating from WorldGuard?

Orbis has an inbuilt migration tool that allows you to migrate your WorldGuard regions.

Simply run /orbis migrate worldguard on a server with Orbis and WorldGuard installed, and your WorldGuard regions will be migrated to Orbis (as well as they can be).

Take a look at the migration wiki page for more information.

Key differences

  • Regions are not "protected by default". Instead, you need to add what flags you want to a region to make it protected.
  • The "passthrough" flag: There isn't one, due to the above.
  • Flags affect all "members" by default.
  • Orbis tries to avoid making flags that don't let you (the user) fine-tune them. For example, the damage-animals on WorldGuard is instead damageable_entities on Orbis. It is a list of entity "keys" e.g. ["minecraft:zombie", "minecraft:husk"]. Meaning, you can pick only the entities you want to allow to take damage. This will also work with modded entities.
  • WorldEdit: Orbis does not use WorldEdit's wand. Instead, it has a custom wand.
  • __global__ region: In Orbis, there is a global region per world and a global region for all worlds.
  • Region priorities: By default, a region has a priority of 2. A world's global region has a priority of 1. The global region encompassing all worlds has a priority of 0.
  • Plugins that use WorldGuard's API: Orbis does not support WorldGuard's API. Plugin developers will have to add support for Orbis' API.

πŸ“† Supported versions

Orbis aims to always support the latest version of Minecraft.

For modded versions, we always target the latest version which is currently 1.21.10.

For Sponge, we currently target API 17+ (1.21.8+).

For Paper we target 1.21.4-1.21.11.

Newer or older versions may work, but are not tested.

πŸ“¦ Downloads

Latest Release


πŸš€ Getting Started

  1. ⬇️ Download the plugin for your platform from the releases page.
  2. πŸ“‚ Drop the .jar file into your server's plugins or mods folder.
  3. πŸ”„ Restart your server. Orbis will generate its config and be ready to use!

πŸ“š API & Integration

Replace PLATFORM with your server type (e.g., paper, fabric, neoforge, sponge). For Bukkit-compatible servers, use paper.

Replace VERSION with the latest Orbis version. For snapshots, use the /snapshots repo and append -SNAPSHOT.

repositories {
    maven("https://repo.empirewar.org/releases")
}

dependencies {
    compileOnly("org.empirewar.orbis:PLATFORM-api:VERSION")
}

πŸ›  Getting the API instance

OrbisAPI api = OrbisAPI.get();

🌐 Accessing the RegionisedWorld

RegionisedWorld worldSet = OrbisAPI.get().getRegionisedWorld(Key.key("minecraft", "overworld"));

🏳️ Registering Custom Flags

You can define and register your own region flags. Registering a flag requires a Codec from Mojang DFU for serialisation!

Here’s how Orbis registers its default flags and how you can register your own:

// Register your flag (in plugin init)
RegistryRegionFlag<Boolean> CAN_FLY = RegistryRegionFlag.<Boolean>builder()
    .key(Key.key("myplugin", "can_fly"))
    .codec(Codec.BOOL) // Mojang DFU Codec
    .defaultValue(() -> false)
    .description("Whether players can fly in this region")
    .build();
OrbisRegistries.FLAGS.register(CAN_FLY.key(), CAN_FLY);

// Usage in a region:
region.addFlag(CAN_FLY);
region.setFlag(CAN_FLY, true); // Allow flying in this region

You must register your flags prior to Orbis being fully enabled! (i.e. before onEnable() on Bukkit platforms)

To query a flag on a region:

Optional<Boolean> canFly = region.query(RegionQuery.Flag.<Boolean>builder()
    .flag(CAN_FLY)
    .build())
    .result();

πŸ” Queries

You can perform advanced queries on regions and worlds. Here are real examples:

Query all regions at a position:

Set<Region> regions = worldSet.query(RegionQuery.Position.builder()
    .position(new Vector3d(-580, 81, -26))
    .build())
    .result();

Chained query: check if a flag is allowed at a position:

boolean canBreak = worldSet.query(RegionQuery.Position.builder()
        .position(-580, 81, -26))
    .query(RegionQuery.Flag.builder(DefaultFlags.CAN_BREAK))
    .result()
    .orElse(true);

Priority and parent region queries:

Region region = new Region("test", new CuboidArea());
GlobalRegion parent = new GlobalRegion("parent");
parent.addFlag(DefaultFlags.CAN_BREAK);
parent.setFlag(DefaultFlags.CAN_BREAK, false);
region.addParent(parent);

Optional<Boolean> canBreak = region.query(RegionQuery.Flag.builder(DefaultFlags.CAN_BREAK)).result();
// canBreak will be false due to parent

Complex world query with priorities:

// If multiple regions overlap, highest priority wins
final boolean canBreak = worldSet.query(RegionQuery.Position.builder()
        .position(new Vector3d(4, 4, 4))
        .build())
    .query(RegionQuery.Flag.<Boolean>builder()
        .flag(DefaultFlags.CAN_BREAK)
        .build())
    .result()
    .orElse(true);

Other Examples

You may be able to find other examples in the tests.


πŸŽ‰ Events

Orbis fires events for every platform:

  • RegionEnterEvent
  • RegionLeaveEvent

Listen to these to react to players entering or leaving regions!

πŸ“– Javadocs

Full documentation is available at: Orbis Javadocs


🀝 Contributing

We welcome PRs and ideas! To get started:

  • Fork the repo and create a feature branch
  • Open a pull request with clear description
  • Join our Discord for dev chat

πŸ“„ License

Orbis is released under the MIT License. See LICENSE for details.

Packages

 
 
 

Contributors

Languages