Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.2.0 #18

Merged
merged 20 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
f0d7768
Refactor ReloadCommand to use PluginManager for reloading and update …
illyrius666 Dec 10, 2024
c26abb8
added support for 1.21.1 - 1.21.3 - 1.21.4
illyrius666 Dec 10, 2024
f57ed34
Refactor ModuleManager and VanillaPlus to centralize message handling…
illyrius666 Dec 10, 2024
223ac4e
Refactor Modular interface and remove PERMS interface for improved mo…
illyrius666 Dec 10, 2024
4f84438
Refactor DoorsModule to improve permission handling and simplify cond…
illyrius666 Dec 10, 2024
e766afb
Bump version to 1.2.0 and refactor interfaces for improved modularity
illyrius666 Dec 10, 2024
fd5a7b6
Refactor SettingsGUI to improve inventory initialization and item han…
illyrius666 Dec 10, 2024
94e079b
Refactor DoorsModule to simplify permission checks and improve code r…
illyrius666 Dec 11, 2024
cf856e3
Refactor code to improve consistency and readability by changing inst…
illyrius666 Dec 11, 2024
445c5a9
Add detailed documentation for ModuleInterface, AdjacentBlockRecord, …
illyrius666 Dec 11, 2024
9ba8493
Add method to retrieve all data from the database and update inventor…
illyrius666 Dec 11, 2024
1442aeb
Remove outdated documentation comments from ModuleInterface, Adjacent…
illyrius666 Dec 11, 2024
6a396ce
+
illyrius666 Dec 11, 2024
654d1a6
init implementation of elevatormodule
illyrius666 Dec 13, 2024
9a9e414
+
illyrius666 Dec 13, 2024
017881d
+
illyrius666 Dec 15, 2024
0ce76d1
+
illyrius666 Dec 15, 2024
926ae33
-
illyrius666 Dec 16, 2024
a62be50
Refactor configuration system and remove dev-specific files
illyrius666 Dec 16, 2024
0719fbc
+ some small fixes
illyrius666 Dec 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions .devcontainer/devcontainer.json

This file was deleted.

3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ build/
.idea/
*.iml

# VS Code specific files
.vscode/

# OS generated files
.DS_Store
Thumbs.db
Expand Down
4 changes: 0 additions & 4 deletions .vscode/settings.json

This file was deleted.

12 changes: 0 additions & 12 deletions .vscode/tasks.json

This file was deleted.

63 changes: 63 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<a name="readme-top"></a>

<h1 align="center">
<br />
<a href="https://xodium.org/">
<img src="" alt="VanillaPlus Logo" width="200">
</a>
<br /><br />
VanillaPlus
<br />
<br />
</h1>

<h4 align="center"> Minecraft plugin that enhances the base gameplay. </h4><br />

<div align="center">

[![Contributors][contributors_shield_url]][contributors_url]
[![Issues][issues_shield_url]][issues_url]
[![Roadmap][roadmap_shield_url]][roadmap_url]<br />

## Table of Contents

- [About The Project](#about-the-project)
- [Code of Conduct][code_of_conduct_url]
- [Contributing][contributing_url]
- [License][license_url]

## About The Project

<!-- xCLOUD is not just a cloud, it's the companion of xCAC in processing BIM objects fast and efficiently. Built to simplify the cloud process.

**Why xCLOUD?**

> :gear: **DRY-Principle**

> :straight_ruler: **Customizable and Precise design**

> :hourglass_flowing_sand: **Time-saving and Efficient**

> :white_check_mark: **Currently built to:** `Binary`

As the coding landscape evolves, so will xCLOUD. Expect ongoing updates and improvements to cater to diverse project needs. Your feedback, suggestions, and contributions are highly valued, let's make xCLOUD even better together.

Feel free to dive into the documentation to kickstart your journey with xCLOUD. -->

<div align="center"><h3>Built With</h3>

[![Built With][built_with_shield_url]][built_with_url]</div>

</details><p align="right"><a href="#readme-top">▲</a></p>

[built_with_shield_url]: https://skillicons.dev/icons?i=vscode,docker,java,gradle,sqlite,github,githubactions
[built_with_url]: https://skillicons.dev
[code_of_conduct_url]: https://github.com/XodiumSoftware/xCLOUD?tab=coc-ov-file
[contributing_url]: https://github.com/XodiumSoftware/xCLOUD/blob/main/CONTRIBUTING.md
[contributors_shield_url]: https://img.shields.io/github/contributors/XodiumSoftware/xCLOUD?style=for-the-badge&color=blue
[contributors_url]: https://github.com/XodiumSoftware/xCLOUD/graphs/contributors
[issues_shield_url]: https://img.shields.io/github/issues/XodiumSoftware/xCLOUD?style=for-the-badge&color=yellow
[issues_url]: https://github.com/XodiumSoftware/xCLOUD/issues
[license_url]: https://github.com/XodiumSoftware/xCLOUD?tab=AGPL-3.0-1-ov-file
[roadmap_shield_url]: https://img.shields.io/badge/Roadmap-Click%20Me!-purple.svg?style=for-the-badge
[roadmap_url]: https://github.com/orgs/XodiumSoftware/projects/4
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
}

group = "org.xodium.vanillaplus"
version = "1.1.4"
version = "1.2.0"
description = "Minecraft plugin that enhances the base gameplay."

repositories {
Expand Down
99 changes: 0 additions & 99 deletions src/main/java/org/xodium/vanillaplus/Database.java

This file was deleted.

27 changes: 15 additions & 12 deletions src/main/java/org/xodium/vanillaplus/ModuleManager.java
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
package org.xodium.vanillaplus;

import org.xodium.vanillaplus.interfaces.MSG;
import org.xodium.vanillaplus.interfaces.Modular;
import org.xodium.vanillaplus.interfaces.ModuleInterface;
import org.xodium.vanillaplus.modules.DoorsModule;
import org.xodium.vanillaplus.modules.SaplingModule;

import java.util.List;
import java.util.stream.Stream;

public class ModuleManager {
private final VanillaPlus vp = VanillaPlus.getInstance();
private static final VanillaPlus VP = VanillaPlus.getInstance();

{
List.of(new DoorsModule())
.stream()
.peek(Modular::config)
.filter(Modular::isEnabled)
.forEach(module -> {
vp.getServer().getPluginManager().registerEvents(module, vp);
vp.getLogger().info(MSG.MODULE_LOADED + module.getClass().getSimpleName());
static {
Stream.of(new DoorsModule(), new SaplingModule())
.peek(ModuleInterface::config)
.filter(ModuleInterface::enabled)
.forEach(mod -> {
long startTime = System.currentTimeMillis();
VP.getServer().getPluginManager().registerEvents(mod, VP);
long endTime = System.currentTimeMillis();
VP.getLogger()
.info("Loaded: " + mod.getClass().getSimpleName() + "| Took " + (endTime - startTime)
+ "ms");
});
}
}
72 changes: 38 additions & 34 deletions src/main/java/org/xodium/vanillaplus/VanillaPlus.java
Original file line number Diff line number Diff line change
@@ -1,46 +1,50 @@
package org.xodium.vanillaplus;

import java.util.Arrays;
import org.bukkit.plugin.java.JavaPlugin;
import org.xodium.vanillaplus.commands.ReloadCommand;

import java.util.Arrays;

public class VanillaPlus extends JavaPlugin {
private static final String[] V = {"1.21.3"};
private static final String[] PAPER = { "Paper" };
private static final String IS_PAPER_MSG = "This plugin is not compatible with non-Paper servers.";
private static final String IS_SUPPORTED_VERSION_MSG = "This plugin requires Paper version(s): "
+ String.join(", ", V);

private static final String[] V = { "1.21.3" };
private static final String[] PAPER = { "Paper" };
private static final String IS_PAPER_MSG = "This plugin is not compatible with non-Paper servers.";
private static final String IS_SUPPORTED_VERSION_MSG = "This plugin requires Paper version: " + String.join(", ", V);
public static final String PREFIX = "<gold>[<dark_aqua>VanillaPlus<gold>] <reset>";

public static VanillaPlus getInstance() {
return getPlugin(VanillaPlus.class);
}
public static VanillaPlus getInstance() {
return getPlugin(VanillaPlus.class);
}

@Override
public void onEnable() {
if (!isPaper()) {
disablePlugin(IS_PAPER_MSG);
return;
@Override
public void onEnable() {
if (!isPaper()) {
disablePlugin(IS_PAPER_MSG);
return;
}
if (!isSupportedVersion()) {
disablePlugin(IS_SUPPORTED_VERSION_MSG);
return;
}
saveDefaultConfig();
new ReloadCommand();
new ModuleManager();
}
if (!isSupportedVersion()) {
disablePlugin(IS_SUPPORTED_VERSION_MSG);
return;

private void disablePlugin(String msg) {
getLogger().severe(msg);
getServer().getPluginManager().disablePlugin(this);
}

private boolean isSupportedVersion() {
return Arrays.stream(V)
.anyMatch(v -> getServer().getVersion().contains(v));
}

private boolean isPaper() {
return Arrays.stream(PAPER)
.anyMatch(v -> getServer().getName().contains(v));
}
new ReloadCommand();
new ModuleManager();
}

private void disablePlugin(String msg) {
getLogger().severe(msg);
getServer().getPluginManager().disablePlugin(this);
}

private boolean isSupportedVersion() {
return Arrays.stream(V)
.anyMatch(v -> getServer().getVersion().contains(v));
}

private boolean isPaper() {
return Arrays.stream(PAPER)
.anyMatch(v -> getServer().getName().contains(v));
}
}
Loading