Commit Graph

3360 Commits

Author SHA1 Message Date
asofold
6a7d56c5ac IEntityAccessVehicle.addPassenger, reduce warnings.
Supposedly just making use of altered internal+external API. No
substantial change.
2017-04-02 20:47:24 +02:00
asofold
386d484939 Change TeleportUtil.teleport to PassengerUtil.teleportWithPassengers.
* Removes TeleportUtil.
* Hasn't implemented handling multiple passengers, yet.
2017-04-02 20:24:34 +02:00
asofold
5e751e492b Make PassengerUtil non static.
Some more handling of multiple passengers, incomplete.
2017-04-02 20:05:59 +02:00
asofold
30c3a40622 Towards vehicles with multiple passengers. 2017-04-02 18:55:32 +02:00
asofold
f7a11bbc95 Comments: Attribute.GENERIC_MAX_HEALTH / IGenericInstanceHandle. 2017-04-02 17:49:53 +02:00
asofold
0491fa7805 Use getWidth and getHeight for Bukkit entities, once available.
* Simplify MC version string.
2017-04-02 17:23:17 +02:00
asofold
c017d00866 Don't run legacy sweep attack detection, if the DamageCause exists. 2017-04-02 16:43:01 +02:00
asofold
4d84a9f512 Use MovingData.debug here. 2017-04-02 15:08:27 +02:00
asofold
c5e1f6ba2b [BLEEDING][BREAKING] Player move set back: cancel event + schedule TP.
Because Spigot changed to fire the teleport following an altered move
end point with TeleportCause.PLUGIN, we have to alter set back handling,
so we can ensure to keep TeleportCause.UNKNOWN for setting back players.

Instead of altering the move end point, the event is just cancelled, and
a teleport is scheduled (with a dedicated TickTask method). Uncancelled
moving events mean removing scheduled teleports.

[BLEEDING]
* Comparably simple change - more places and special cases may still be
uncovered.

[BREAKING]
* Plugins that may rely on the exact sequence of things within NCP, as
it used to be.

Random
* Change "set-back" to "set back" everywhere for simplicity, and to
obfuscate the actual code changes.
* Set backs are now going through MovingListener.onCancelledMove instead
of MovingListener.onMoveMonitorNotCancelled.
* Illegal move handling would still use event.setTo.
2017-04-02 15:01:23 +02:00
asofold
8b3dcff7c4 Simplify onTick, let JIT decide. 2017-04-01 18:52:09 +02:00
asofold
d324fc02fd Log details in flylong, and always for file+console.
* Split log messages: ingame vs. console+file
* Alter flylong to contain tags.

Performance-wise, it's not optimal that flylong is the same as flyfile
at this stage. Not sure if to remove flylong in favor of using flyfile,
to indicate it means details - main objective is to get minimal details
into the violation log, even if people edit it out of the ingame chat
messages.
2017-04-01 16:10:11 +02:00
asofold
6aeef95fb7 [BREAKING] Don't use TelelportCause.PLUGIN to avoid confusion (p+v).
Players and vehicles:
Instead always use UNKNOWN, as that is what results from
PlayerMoveEvent.setTo(newTo), as we use it for setting back players.

This should break functionality that relies on TeleportCause.PLUGIN
being used, possibly more likely with vehicles.
2017-04-01 14:29:57 +02:00
asofold
e3d5b70db8 Order.
(See if hooks work now.)
2017-02-22 23:16:38 +01:00
asofold
c046658c86 Allow the elytra model for creative mode, when not flying. 2017-02-22 22:51:04 +01:00
asofold
7ee946c899 [BLIND] Slowness hack for walkSpeed and attributes.
And:
* Move default walkSpeed/dlySpeed constants to Magic.
2017-02-21 19:26:46 +01:00
asofold
0ae9e962ab Add a method to remove all block change entries for certain coordinates. 2017-02-07 22:30:31 +01:00
asofold
514945f936 Cap additum for hacc at 10. 2017-02-05 12:54:25 +01:00
asofold
6f1b97c932 Add a simplified method to add custom (fake) block changes.
Internally, the tick is stored with a change id, so we can reuse a
changeId, if the tick is still the same, preserving rough order, as the
changeId should at least increase with the tick.
2017-02-03 23:49:26 +01:00
asofold
6f51fc531b isRedundant: Do check for null before calling equals.
(So far intended use always has an IBlockCacheInstance set.)
2017-02-03 22:58:47 +01:00
asofold
e129b58a6f Expire entries based on interval of validity, if set.
If a position has many entries, the oldest valid state deserves being
accounted for.
2017-02-03 22:07:29 +01:00
asofold
4cc747d8f4 Provide a public method to add custom/fake block change entries.
This isn't the last word on a public API, there likely will be the
following additions.
* One more simplified method with a minimal signature for simple
(non-push) entries (worldId, x, y, z, previousState).
* Optimized methods for adding multiple entries at once. Likely for
adding multiple entries of the same type/data/shape. Plus perhaps
simplified signatures to do without changeId and tick.

(Not sure if there will be need for a method allowing for a collection
of a to be defined class combining x+y+z+previousState.)

This will evolve based on feedback from GitHub issues.
2017-02-03 21:36:41 +01:00
asofold
a4596ede1a Don't skip processing if blocks are there (...). 2017-02-01 17:53:23 +01:00
asofold
72b454bbab [BLEEDING] Elytra boost: Who tested the other version!? 2017-01-29 19:20:47 +01:00
asofold
c2449ac08a [BLEEDING] Elytra boost: track and allow ascend.
Lots of issues remain with elytra, with and without boost. Selection:
* maxheight will trigger with the rocket feature, naturally. Mendable by
increasing it via configuration
(checks.moving.creativelfly.model.elytra.vertical.maxheight). Not sure
we'll just increase the limit or alter how it's dealt with (e.g. also
for sf: lock to a max / high slope value, independently of the set-back
and world height, alter as necessary).
* All sorts of transitions, e.g. onto ground, into water.
* Loss of boost right after adding (not sure if already fixed).
* What with hover, actually?
* Is the flight duration infinite with power 127?
* Issues with ascending after descending, even without boost?
2017-01-29 19:00:52 +01:00
asofold
8237fbca57 Fix NoFall issues on Spigot/MC 1.7.10.
Changes contain:
* MCAccess.dealFallDamageFiresAnEvent -> true
* Always log basic data on (handled) fall damage events.
* Add a tag for the cancel reason with NoFall. Alter the default alert
message.
* Move 3.0 to Magic.
* Set the skipping flag correctly on allowFlight being set.
2017-01-22 23:36:55 +01:00
asofold
b0a9f35f2d Dummy commit to check stuff. 2017-01-17 02:03:16 +01:00
asofold
5b0807847f Don't give silent permissions as child permissions by default. 2017-01-17 01:03:55 +01:00
asofold
272aaf3063 Don't test block change activity before the extreme move check runs.
(+ only test activity, if the extreme move check was passed.)
2017-01-08 16:17:21 +01:00
asofold
6bcaef9057 Disambiguate + fix redundant method call. 2017-01-08 16:08:21 +01:00
asofold
f560e756f5 isSameShape: with early return on either parameter being null. 2016-12-30 19:16:24 +01:00
asofold
cf04ee5a5d Track the current world name in ChatData for now. 2016-12-29 14:43:10 +01:00
asofold
9dd01a6d59 [BLEEDING] Since builds fail with 1.11, use 1.11.2 here. 2016-12-29 13:46:04 +01:00
asofold
b99fe62517 [BLEEDING] Use early 1.10 and 1.11 for native dependencies.
(Hoping for Jenkins to build.)
2016-12-29 13:42:58 +01:00
asofold
119e664d70 [BLEEDING] Update NCPCompatCBDev to 1.11.2. 2016-12-29 13:34:25 +01:00
asofold
a4e106af52 Don't use the pre-1.11 method past 1.11. 2016-12-29 13:26:33 +01:00
asofold
ac825516ad Use 1.10.2 as dependency. 2016-12-29 13:10:28 +01:00
asofold
664a01b951 Comment on having ReflectEntity there. 2016-12-29 13:06:37 +01:00
asofold
b6ae8049b7 [BLEEDING] Ignore Minecraft fall distance if it's greater than tracked.
Fall damage is adjusted or cancelled, if the Minecraft fall distance is
greater than the distance(s) tracked by NCP (per move diffs, maximum y).
Intention is to prevent (speeding by) self damage by abusing Minecraft
dealing fall for untracked moves.
Issue: https://github.com/NoCheatPlus/Issues/issues/338
2016-12-29 00:19:55 +01:00
asofold
d85ee35d99 8465c40d93 (commitcomment-20312231) 2016-12-28 21:52:15 +01:00
asofold
8465c40d93 Register .silent check permission in postEnable.
Issue: https://github.com/NoCheatPlus/Issues/issues/353)
2016-12-28 10:37:34 +01:00
asofold
11be3c7c0d Register the inventory.open permission.
Found via auto-generating .silent check permissions :p.
2016-12-28 10:30:35 +01:00
asofold
b0f3f3a937 Oops. 2016-12-27 23:38:04 +01:00
asofold
5089447aa1 Add a dedicated compatibility module for 1.10.x (1.10 R1).
* Auto generate the sub-module file structure.
* Add rest manually.

Rest
* Enter new classes into factories.
* Add entries for modules and dependencies to the root pon and the
NCPPlugin pom, to make the new module represent 1.10 R1.
* Point the 1.10_r1 build profiles to the new module.
* Add a new module for 1.11, point to cbdev (which still is 1.10.2,
though).

Next steps (next MC release, probably):
* At least auto generate a file, containing all entries to make for the
new module, for convenient use with copy and paste.
* (Later: alter the files automatically, possibly interactive. Needs
more care, e.g. if profile entries already exist. The factory entries
can have a marker each.)
2016-12-27 23:36:03 +01:00
asofold
c296170ef7 Correct supported versions, clarify. 2016-12-27 19:50:06 +01:00
asofold
bd856c4a75 Add a script to create a detached module off NCPCompatCBDev. 2016-12-27 19:49:13 +01:00
asofold
32c0250530 (Note entity bounding boxes on pre-1.7.10.) 2016-12-27 16:39:32 +01:00
asofold
db68a710d9 isIllegalBounds: Check for bad coordinates as well. Down to 1.7.10. 2016-12-27 16:36:25 +01:00
asofold
95b2984ca9 [BLEEDING] Implement isIllegalBounds for cbreflect. 2016-12-27 16:34:39 +01:00
asofold
1ba300f3af [BREAKING] Move matchBlockFace to MapUtil.
(Likely no one is using this by now.)
2016-12-27 15:33:36 +01:00
asofold
b406204ce2 [BREAKING] Move isBadCoordinate to LocUtil. 2016-12-27 15:30:51 +01:00