Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
2e70993
Starting 1.14 but honestly fuck this
501warhead Jul 10, 2019
3de2155
Merge branch 'master' of https://gitlab.lordofthecraft.net/501warhead…
501warhead Jul 10, 2019
ec60d4e
Build indexes properly & prevent any non-utf8 character from being saved
501warhead Aug 5, 2019
342ca20
Merge branch 'dev' into 'master'
501warhead Aug 5, 2019
1d28216
Remove debug and add bamboo logging
Kowagirl Nov 30, 2019
5e7a106
Add bamboo to bottom dependants
Kowagirl Nov 30, 2019
4143683
Updating version #
Korrivyn Nov 30, 2019
27a9581
Forgot the outer pom
Korrivyn Nov 30, 2019
a34b768
Attempted fixes when Omni was crashing. Will need to investigate furt…
Korrivyn Dec 14, 2019
82d4e45
Updated POMs to 1.15. Import junit directly.
Korrivyn Dec 14, 2019
e68899b
Fix bamboo crash
Kowagirl Dec 17, 2019
74df5c0
Merge branch '1.14' into '1.15'
Kowagirl Dec 17, 2019
511e6b8
Actually fix bambi
Kowagirl Dec 17, 2019
4d09329
Fixes to i, b, and before params
Kowagirl May 12, 2020
f7ee0d0
Inceased scope of entity death logging
Kowagirl Jun 4, 2020
522d167
Remove plugin-directed armor stand 'death' logging
Kowagirl Jul 11, 2020
d6cb93c
Add world parameter and some cleanup
Kowagirl Aug 9, 2020
bb336ce
Fix player join location, see comments
Kowagirl Aug 9, 2020
4fda6da
Quality of life: magnetic tool
Kowagirl Aug 9, 2020
babd876
add target meta and recipient param
Kowagirl Oct 2, 2021
2371d05
Merge pull request #2 from Lord-of-the-Craft/1.15
Kowagirl Oct 2, 2021
0b9cf80
fix: add more options to regex for m search
Kowagirl Oct 11, 2021
00a089b
Added Readme
Vooperino Nov 26, 2021
6d9027a
Maven POM improvements
Vooperino Nov 26, 2021
6bfc27d
Added Docker compose for mongodb
Vooperino Nov 26, 2021
ccb13c0
Internal changes
Vooperino Nov 26, 2021
d72dd8d
Fixes and improvements
Vooperino Nov 26, 2021
2975662
Pom fixes
Vooperino Nov 26, 2021
fa4affb
Pom fixes
Vooperino Nov 28, 2021
aa49d2e
NPE fixes
Vooperino Nov 28, 2021
e0b30cf
Changed the volumes settings for the docker compose
Vooperino Nov 28, 2021
e879d6a
Slowly adding Essn Support
Vooperino Nov 28, 2021
648c9a8
Added lombok
Vooperino Nov 28, 2021
49e8901
Version Change
Vooperino Nov 28, 2021
888b699
Changes
Vooperino Nov 28, 2021
5fe3103
Added Omni Utils
Vooperino Nov 28, 2021
f9a5c0c
Improved the Omni Tool
Vooperino Nov 28, 2021
111bf12
Java 17 pom fixes
Vooperino Nov 30, 2021
c07f061
1.18 fixes
Vooperino Dec 1, 2021
b463a64
Improved multi version handling
Vooperino Dec 1, 2021
cde433d
Version bump
Vooperino Dec 1, 2021
bd65dcd
Fix
Vooperino Dec 11, 2021
c5b60c1
POM Changes
Vooperino Feb 13, 2022
1189918
Removed Essn
Vooperino Feb 13, 2022
cb054e3
Added item key
Vooperino Feb 13, 2022
d9de930
Updated utils
Vooperino Feb 13, 2022
ddd26a0
Updated README.md
Vooperino Feb 13, 2022
630a397
Readme change
Vooperino Feb 17, 2022
d524360
Plugin configuration description change
Vooperino Feb 17, 2022
552d530
Removed the unused comment
Vooperino Feb 17, 2022
04211ff
Version bump
Vooperino Feb 18, 2022
bab9ba3
Couple of fixes
Vooperino Feb 18, 2022
4061324
Updated README
Vooperino Feb 18, 2022
2a82ad6
Docker compose file changes
Vooperino Feb 18, 2022
081537a
Dependencies Update
Vooperino Mar 2, 2022
bf12d4d
1.18.2
Vooperino Mar 2, 2022
35de89a
Java Version downgrade due to the 1.16.x can be supported and updated…
Vooperino Mar 29, 2022
e001e6e
Java Version downgrade due to the 1.16.x can be supported
Vooperino Mar 29, 2022
9803ceb
Updating Pom
Vooperino Jun 28, 2022
093ad9d
Updating Plugin configuration
Vooperino Jun 28, 2022
4b50a84
Removing Support for 1.16.x and 1.17.x, but adding support for 1.19.x
Vooperino Jun 28, 2022
eec03b3
Apache common fixes
Vooperino Jun 28, 2022
cde958f
Merge pull request #1 from voop-lv/1.3
Vooperino Aug 5, 2022
8ac0f2e
Updated dependencies since 1.19.2 had issues
Vooperino Nov 12, 2022
1faa17e
1.3.1 update
Vooperino Nov 14, 2022
db810cd
Enabling 1.19.3 Version
Vooperino Jan 6, 2023
b63d942
1.3.3 version
Vooperino Mar 18, 2023
67febd3
Added 1.20 into the Versioning list
Vooperino Jun 16, 2023
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
47 changes: 29 additions & 18 deletions Omniscience-Core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,24 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>Omniscience</artifactId>
<groupId>net.lordofthecraft</groupId>
<version>1.0.5</version>
<relativePath>../pom.xml</relativePath>
<groupId>io.github.warhead501</groupId>
<version>1.3.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>Omniscience-Core</artifactId>

<description>The Spigot solution to block logging and rollbacks for 1.13.2+</description>
<description>The Spigot solution to block logging and rollbacks for 1.18.X+</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<url>https://lotc.co/</url>

<pluginRepositories>
<pluginRepository>
<id>apache.snapshots</id>
<url>https://repository.apache.org/snapshots/</url>
</pluginRepository>
</pluginRepositories>

<build>
<finalName>Omniscience</finalName>
Expand All @@ -25,16 +30,16 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<version>3.9.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>17</source>
<target>17</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4.3</version>
<version>3.3.1-SNAPSHOT</version>
<executions>
<execution>
<phase>package</phase>
Expand All @@ -44,19 +49,18 @@
<configuration>
<shadedArtifactAttached>false</shadedArtifactAttached>
<createDependencyReducedPom>false</createDependencyReducedPom>

<relocations>
<relocation>
<pattern>me.lucko.commodore</pattern>
<shadedPattern>net.lordofthecraft.omniscience.commodore</shadedPattern>
<shadedPattern>io.github.warhead501.omniscience.commodore</shadedPattern>
</relocation>
</relocations>

<artifactSet>
<includes>
<include>org.mongodb:mongo-java-driver:**</include>
<include>me.lucko:commodore</include>
<include>net.lordofthecraft:OmniscienceAPI</include>
<include>org.apache.commons:commons-lang3</include>
<include>io.github.warhead501:OmniscienceAPI</include>
</includes>
</artifactSet>
</configuration>
Expand All @@ -74,15 +78,15 @@

<dependencies>
<dependency>
<groupId>net.lordofthecraft</groupId>
<groupId>io.github.warhead501</groupId>
<artifactId>OmniscienceAPI</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.sk89q.worldedit</groupId>
<artifactId>worldedit-bukkit</artifactId>
<version>7.0.0-SNAPSHOT</version>
<version>7.3.0-SNAPSHOT</version>
<scope>provided</scope>
<exclusions>
<exclusion>
Expand All @@ -99,18 +103,25 @@
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-dynamodb</artifactId>
<version>1.11.462</version>
<version>1.12.239</version>
</dependency>
<dependency>
<groupId>me.lucko</groupId>
<artifactId>commodore</artifactId>
<version>1.2</version>
<version>2.3-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>2.23.0</version>
<version>4.6.1</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/junit/junit-->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package net.lordofthecraft.omniscience;
package io.github.warhead501.omniscience;

import net.lordofthecraft.omniscience.io.StorageHandler;
import net.lordofthecraft.omniscience.io.dynamo.DynamoStorageHandler;
import net.lordofthecraft.omniscience.io.mongo.MongoStorageHandler;
import io.github.warhead501.omniscience.io.dynamo.DynamoStorageHandler;
import io.github.warhead501.omniscience.io.StorageHandler;
import io.github.warhead501.omniscience.io.mongo.MongoStorageHandler;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.inventory.ItemStack;
import org.bukkit.persistence.PersistentDataType;

/**
* The singular location for all end user configured directives from the plugin.yml
Expand Down Expand Up @@ -246,10 +248,22 @@ public int getPurgeBatchLimit() {
/**
* @return The material used for the search wand. Must be a block.
*/
public Material getWandMaterial() {
@Deprecated public Material getWandMaterial() {
return wandMaterial;
}

/**
* @return The item stack used for the search wand. Must be a block.
*/
public ItemStack getWandItem() {
ItemStack is = new ItemStack(this.wandMaterial);
var meta = is.getItemMeta();
var container = meta.getPersistentDataContainer();
container.set(Omniscience.getInstance().getItemKey(), PersistentDataType.STRING,"tool");
is.setItemMeta(meta);
return is;
}

/**
* @return Whether debug messages are enabled
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,31 +1,36 @@
package net.lordofthecraft.omniscience;
package io.github.warhead501.omniscience;

import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import io.github.warhead501.omniscience.api.OmniApi;
import io.github.warhead501.omniscience.api.OmniVersionHelper;
import io.github.warhead501.omniscience.api.display.*;
import io.github.warhead501.omniscience.api.entry.*;
import io.github.warhead501.omniscience.api.flag.*;
import io.github.warhead501.omniscience.api.interfaces.IOmniscience;
import io.github.warhead501.omniscience.api.interfaces.WorldEditHandler;
import io.github.warhead501.omniscience.api.parameter.*;
import io.github.warhead501.omniscience.api.util.OmniUtils;
import io.github.warhead501.omniscience.api.util.PastTenseWithEnabled;
import io.github.warhead501.omniscience.command.OmniscienceCommand;
import io.github.warhead501.omniscience.command.OmniscienceTabCompleter;
import io.github.warhead501.omniscience.command.util.OmniTeleCommand;
import io.github.warhead501.omniscience.listener.CraftBookSignListener;
import io.github.warhead501.omniscience.listener.PluginInteractionListener;
import io.github.warhead501.omniscience.listener.WandInteractListener;
import lombok.Getter;
import me.lucko.commodore.Commodore;
import me.lucko.commodore.CommodoreProvider;
import net.lordofthecraft.omniscience.api.OmniApi;
import net.lordofthecraft.omniscience.api.display.*;
import net.lordofthecraft.omniscience.api.entry.*;
import net.lordofthecraft.omniscience.api.flag.*;
import net.lordofthecraft.omniscience.api.interfaces.IOmniscience;
import net.lordofthecraft.omniscience.api.interfaces.WorldEditHandler;
import net.lordofthecraft.omniscience.api.parameter.*;
import net.lordofthecraft.omniscience.api.util.PastTenseWithEnabled;
import net.lordofthecraft.omniscience.command.OmniscienceCommand;
import net.lordofthecraft.omniscience.command.OmniscienceTabCompleter;
import net.lordofthecraft.omniscience.command.util.OmniTeleCommand;
import net.lordofthecraft.omniscience.io.StorageHandler;
import net.lordofthecraft.omniscience.listener.CraftBookSignListener;
import net.lordofthecraft.omniscience.listener.PluginInteractionListener;
import net.lordofthecraft.omniscience.listener.WandInteractListener;
import io.github.warhead501.omniscience.io.StorageHandler;
import org.bukkit.Bukkit;
import org.bukkit.NamespacedKey;
import org.bukkit.command.PluginCommand;
import org.bukkit.entity.Player;
import org.bukkit.plugin.PluginManager;
import org.bukkit.scheduler.BukkitScheduler;
import org.jetbrains.annotations.NotNull;

import java.util.*;
import java.util.logging.Level;
Expand All @@ -43,10 +48,17 @@ final class OmniCore implements IOmniscience {
private WorldEditHandler worldEditHandler;
private StorageHandler storageHandler;

@Getter private NamespacedKey itemKey;

private OmniVersionHelper versionHelper;

OmniCore() {
}

void onEnable(Omniscience omniscience, BukkitScheduler scheduler) {
this.itemKey = new NamespacedKey(omniscience,"omnisciencetool");
this.versionHelper = OmniVersionHelper.get(OmniUtils.getNMSVersion());
if (this.versionHelper==null) throw new UnsupportedOperationException("Omni does not support "+OmniUtils.getNMSVersion()+" version! But it was reporting back as "+OmniUtils.getNMSVersion());
try {
OmniApi.setCore(this);
} catch (IllegalAccessException e) {
Expand Down Expand Up @@ -88,9 +100,7 @@ void onEnable(Omniscience omniscience, BukkitScheduler scheduler) {

if (omniscience.getConfig().getBoolean("integration.worldEdit")
&& Bukkit.getServer().getPluginManager().isPluginEnabled("WorldEdit")) {

}

omniscience.getLogger().log(Level.INFO, "Omniscience is Awake. None can escape.");
}

Expand Down Expand Up @@ -141,8 +151,10 @@ private void registerEventHandlers(Omniscience plugin) {
private void registerParameters() {
registerParameterHandler(new EventParameter());
registerParameterHandler(new PlayerParameter());
registerParameterHandler(new RecipientParameter());
registerParameterHandler(new MessageParameter());
registerParameterHandler(new RadiusParameter());
registerParameterHandler(new WorldParameter());
registerParameterHandler(new TimeParameter());
registerParameterHandler(new CauseParameter());
registerParameterHandler(new BlockParameter());
Expand Down Expand Up @@ -264,6 +276,11 @@ public void registerParameterHandler(ParameterHandler handler) {
parameterHandlerList.add(handler);
}

@Override
public @NotNull OmniVersionHelper getVersion() {
return this.versionHelper;
}

@Override
public Optional<Class<? extends DataEntry>> getEventClass(String name) {
return Optional.ofNullable(eventMap.get(name));
Expand Down Expand Up @@ -338,4 +355,5 @@ public void registerWorldEditHandler(WorldEditHandler handler) {
public String getDateFormat() {
return OmniConfig.INSTANCE.getDateFormat();
}

}
Original file line number Diff line number Diff line change
@@ -1,27 +1,24 @@
package net.lordofthecraft.omniscience;
package io.github.warhead501.omniscience;

import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import net.lordofthecraft.omniscience.api.util.PastTenseWithEnabled;
import net.lordofthecraft.omniscience.listener.OmniListener;
import net.lordofthecraft.omniscience.listener.block.*;
import net.lordofthecraft.omniscience.listener.chat.EventCommandListener;
import net.lordofthecraft.omniscience.listener.chat.EventSayListener;
import net.lordofthecraft.omniscience.listener.entity.EventDeathListener;
import net.lordofthecraft.omniscience.listener.entity.EventHitListener;
import net.lordofthecraft.omniscience.listener.entity.EventInteractAtEntity;
import net.lordofthecraft.omniscience.listener.entity.EventMountListener;
import net.lordofthecraft.omniscience.listener.item.*;
import net.lordofthecraft.omniscience.listener.player.EventJoinListener;
import net.lordofthecraft.omniscience.listener.player.EventQuitListener;
import net.lordofthecraft.omniscience.listener.player.EventTeleportListener;
import io.github.warhead501.omniscience.api.util.PastTenseWithEnabled;
import io.github.warhead501.omniscience.listener.OmniListener;
import io.github.warhead501.omniscience.listener.block.*;
import io.github.warhead501.omniscience.listener.chat.EventCommandListener;
import io.github.warhead501.omniscience.listener.chat.EventSayListener;
import io.github.warhead501.omniscience.listener.entity.EventDeathListener;
import io.github.warhead501.omniscience.listener.entity.EventHitListener;
import io.github.warhead501.omniscience.listener.entity.EventInteractAtEntity;
import io.github.warhead501.omniscience.listener.entity.EventMountListener;
import io.github.warhead501.omniscience.listener.item.*;
import io.github.warhead501.omniscience.listener.player.EventJoinListener;
import io.github.warhead501.omniscience.listener.player.EventQuitListener;
import io.github.warhead501.omniscience.listener.player.EventTeleportListener;
import org.bukkit.plugin.PluginManager;

import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.*;

public enum OmniEventRegistrar {
INSTANCE;
Expand Down Expand Up @@ -85,7 +82,71 @@ public String getPastTense(String event) {
}

public Map<String, PastTenseWithEnabled> getEventMapping() {
return ImmutableMap.copyOf(eventMapping);
try {
return ImmutableMap.copyOf(eventMapping);
} catch (Exception e) {
return new Map<String, PastTenseWithEnabled>() {
@Override
public int size() {
return 0;
}

@Override
public boolean isEmpty() {
return false;
}

@Override
public boolean containsKey(Object key) {
return false;
}

@Override
public boolean containsValue(Object value) {
return false;
}

@Override
public PastTenseWithEnabled get(Object key) {
return null;
}

@Override
public PastTenseWithEnabled put(String key, PastTenseWithEnabled value) {
return null;
}

@Override
public PastTenseWithEnabled remove(Object key) {
return null;
}

@Override
public void putAll(Map<? extends String, ? extends PastTenseWithEnabled> m) {

}

@Override
public void clear() {

}

@Override
public Set<String> keySet() {
return null;
}

@Override
public Collection<PastTenseWithEnabled> values() {
return null;
}

@Override
public Set<Entry<String, PastTenseWithEnabled>> entrySet() {
return null;
}
};
}
}

void addEvent(String name, String pastTense, boolean enabled) {
Expand Down
Loading