Merging changes from maintained fork - #1
Open
501warhead wants to merge 68 commits into
Open
Conversation
Build indexes properly & prevent any non-utf8 character from being saved See merge request 501warhead/omniscience!36
…her with 1.15, still.
Port "Fix bamboo crash" into 1.15 See merge request lotc-master/omniscience!38
501warhead
commented
Feb 13, 2022
|
|
||
| public class MessageParameter extends BaseParameterHandler { | ||
| private final Pattern pattern = Pattern.compile("[\\w!,:-\\\\*]+"); | ||
| private final Pattern pattern = Pattern.compile("[\\w!,'-_.:-\\\\*]+"); |
Owner
Author
There was a problem hiding this comment.
Curious about this change here to the regex
|
|
||
| import io.github.warhead501.omniscience.Omniscience; | ||
|
|
||
| public class WorldParameter extends BaseParameterHandler { |
Owner
Author
There was a problem hiding this comment.
Might be dangerous if used in rollbacks
|
|
||
| @EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR) | ||
| public void onBlockBreak(BlockBreakEvent event) { | ||
| //System.out.println("Block Break - " + event.getBlock().getType()); |
Comment on lines
+23
to
+39
| OEntry.create().source(e.getPlayer()).grewBlock(new LocationTransaction<>(block.getLocation(), null, block)).save(); | ||
| OEntry.create().source(e.getPlayer()).grewBlock(new LocationTransaction<>(block.getLocation(), block, null)).save(); | ||
| } | ||
| } | ||
| } | ||
|
|
||
| @EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR) | ||
| public void onBlockGrow(BlockGrowEvent e) { | ||
| if (isEnabled("grow")) { | ||
| OEntry.create().source(null).grewBlock(new LocationTransaction<>(e.getBlock().getLocation(), e.getBlock().getState(), e.getNewState())).save(); | ||
| OEntry.create().source(null).grewBlock(new LocationTransaction<>(e.getBlock().getLocation(), e.getNewState(), e.getBlock().getState())).save(); | ||
| } | ||
| } | ||
|
|
||
| @EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR) | ||
| public void onBlockSpread(BlockSpreadEvent e) { | ||
| if (isEnabled("grow")) { | ||
| OEntry.create().source(null).grewBlock(new LocationTransaction<>(e.getBlock().getLocation(), e.getNewState(), e.getBlock().getState())).save(); |
Owner
Author
There was a problem hiding this comment.
This looks like an incorrect change. The state should be from -> to, so for newly grown blocks the original must be air, or null. Also, this may need adjustment for the aquatic update because I believe things can "grow" underwater now, yes?
| return; | ||
| } | ||
|
|
||
| if (event.getBlockPlaced().getType().equals(Material.LECTERN) || event.getBlockPlaced().getType().equals(Material.SOUL_LANTERN) && event.getBlockPlaced().getState() instanceof Lectern && |
Owner
Author
There was a problem hiding this comment.
Soul Lantern? This seems strange
| } | ||
| OEntry.create().source(event.getPlayer()).placedBlock(new LocationTransaction<>(event.getBlock().getLocation(), null, sign)).save(); | ||
| } else { | ||
| Omniscience.getPluginInstance().getLogger().info("Unaple to parse changed sign for; " + event.getBlock()); |
| import org.jetbrains.annotations.Nullable; | ||
|
|
||
| @RequiredArgsConstructor | ||
| public enum OmniVersionHelper { |
Owner
Author
There was a problem hiding this comment.
Gotta be a better approach than this. Surely the plugin.yml stops this?
… lucko commodore for 1.18.2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.