-
Notifications
You must be signed in to change notification settings - Fork 1
Merging changes from maintained fork #1
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
base: master
Are you sure you want to change the base?
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
|
|
||
| public class MessageParameter extends BaseParameterHandler { | ||
| private final Pattern pattern = Pattern.compile("[\\w!,:-\\\\*]+"); | ||
| private final Pattern pattern = Pattern.compile("[\\w!,'-_.:-\\\\*]+"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious about this change here to the regex
|
|
||
| import io.github.warhead501.omniscience.Omniscience; | ||
|
|
||
| public class WorldParameter extends BaseParameterHandler { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused comments
| 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(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Unaple"
| import org.jetbrains.annotations.Nullable; | ||
|
|
||
| @RequiredArgsConstructor | ||
| public enum OmniVersionHelper { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotta be a better approach than this. Surely the plugin.yml stops this?
… lucko commodore for 1.18.2
No description provided.