1. Прощаемся с GoodMC
    Прощаемся с GoodMC
    С грустью сообщаю: пришло время закрыть GoodMC после 12 невероятных лет. Спасибо вам всем!
    Здесь можно скачать архивы карт и модов.
    Присоединяйтесь к нашей телеграм группе для дальнейшей связи.
    Удачи всем и до новых встреч!
    Скрыть объявление

Завершено Prism 2 for 1.7.10

Тема в разделе "Разработка", создана пользователем momai, 7 дек 2016.

  1. momai

    momai Administrator В вайтлисте

    Сообщения:
    2.263
    Симпатии:
    234
    Баллы:
    204
    PRISM 2

    Адаптированный для работы на 1.7.10 плагин Prism
    Кратко:
    Работает все кроме инфы о том, кто убил животное. Нет такого события, нельзя пофиксить. Зато пишет многое другое.
    Юзать в основном команду /pr near
    Стал обязательным параметр a:[action] можно вводить несколько
    Добавлена команда /pr animals username - показывает прирученные игроком животные и их коорды.

    Плагин лежит в /home/dev
     
  2. momai

    momai Administrator В вайтлисте

    Сообщения:
    2.263
    Симпатии:
    234
    Баллы:
    204
    Сайт удален, копирую справку по плагиную сюда


    There are so many actions recorded and parameters available to find/restore them we can't possibly give examples of them all, but here are some examples of common needs to get you started.

    Broken blocks, house on fire
    A griefer has broken blocks and set fire to a house. If we don't know who started the fire we can find the person who lit it with:

    /prism l a:lighter

    Or, find who broke the blocks with /prism near or the inspector wand, /prism i.

    A default radius is always used so it's only nearby activity. Once you see who set the fire or broke the blocks, you can use the username(s) to rollback the changes.

    /prism rollback a:break,burn p:nasonfish

    Killed Farm Animals
    Some one has killed the entire cow farm for your player. Who? If /prism near returns too much info then just run a lookup:

    /prism l a:kill

    The "kill" action will show any entities that have been killed nearby and who did it.

    Need to roll them back?

    /prism rollback a:kill p:VortexBuilder3

    Creepers
    Sometimes players will attempt to bypass the server admins and lead a creeper to a house, let it explode, and thereby get away with the grief. Not with Prism.

    When an entity begins to follow a player, we record the event as an entity-follow. It only fires when the entity begins to follow a player so it may have been some distance from the explosion location. However, it's not an issue.

    /prism l a:follow e:creeper r:50

    This will show all players that lured a creeper within 50 blocks. Check the timestamp of the explosion and if it's within a few minutes of the follow, they're very likely connected.

    Rollback a creeper's art:

    /prism rollback a:explode

    "Explode" is a short hand action that also includes tnt. To only rollback a creeper hole, use a:creeper-explode.


    Lookups

    By default, Prism will begin tracking all sorts of events that happen in your worlds. Players making block changes, killing entities, transfers of items, and much more.

    Some of this data is purely informational, so you can find out who did something, and some of it is useful for rollbacks and restores.

    [paste:font size="5"]Searching the DatabaseSee Understanding Parameters By using any arrangement of the parameters you can easily filter through records and find out exactly what you need.

    Lookup queries can be local to you, or even global if you so desire. Need to see only all item-pickup actions by player nasonfish within ten blocks? Or how about where player YeaItsMe last placed a chest in the entire server.

    It's almost limitless.

    Pagination
    Most times, a lookup or near query returns a lot of information. We break this into pages for easier navigating.

    After any lookup or near query, use /prism page [page #] to skip to different pages of results. It simply uses the data from your last search and will expire after five minutes.

    Also available are /pr page next and /pr page prev.

    Teleporting
    When you perform a lookup, the results will include an index number with every action. If using global or extended views, you'll also see the record ID.

    Use /prism tp [index #] to teleport to a record's location.

    or use /pr tp id:[id] to teleport to a specific database record.

    Once teleported you may also use /pr tp (next|prev) to teleport to the next or previous index.

    Note: We're working on a smarter teleport system that will accurately judge the safety of the area, and attempt a nearby spot. This is in development.



     
  3. momai

    momai Administrator В вайтлисте

    Сообщения:
    2.263
    Симпатии:
    234
    Баллы:
    204
    "Parameters" is the name we use for arguments given to commands like lookup, preview, rollback, and restore. They allow you to define exactly which data Prism should be working with.

    You may define any, all, or none (safe defaults assumed if none given). You may use them in any order.

    You can even define multiple arguments for most by separating them with a comma. Like a:break,place

    Parameter List
    • a:[action] - Like "block-break" (See below for full list). No default.
    • r:[radius] - How many blocks near you the action happened, i.e. r:20. Default radius set in config.
    • r:global - Instructs Prism to not limit results to a location. Requires special configuration or permissions (Prism 1.6) to be used for lookups/rollbacks/restores.
    • r:we - Uses a WorldEdit selection to limit all results - lookups/restores/rollbacks. Works for anything that supports the r parameter. Player must have WorldEdit selection permissions.
    • r:player:[radius] Base a radius off of another online player.
    • r:x,y,z:[radius] - Allow a radius around coordinates x,y,z
    • r:world - No radius, but limited to the current world or the world specificed by the w: parameter.
    • r:c - Limits the radius to the current chunk (x/z of the current chunk, from bedrock to world height)
    • b:[blockname/id] - Like b:grass or b:2 or b:2:0. No default.
    • e:[entity] - Like e:pig. No default.
    • t:[timesince] - Events after x long ago. Like 1s(seconds), 20m(minutes), 1h(hour), 7d(days), 2w(weeks). No default. Use time arguments together if you wish, like 1h20m.
    • before:[time] - Events before x long ago.
    • since:[time] - Events after x long ago. Same as t:
    • p:[player] - Like p:viveleroi. No default.
    • w:[world] - Like w:worldname. Defaults to your current world.
    • k:[world] - Text-based keyword search (for commands/chat mainly)
    • id:[world] - A single record id.
    Use ! to exclude an action, player, or entity. For example: /pr rollback a:break p:!viveleroi

    Use ~ to make partial matches for player names. For example: /pr rollback a:break p:~vive

    Actions List
    Short actions are simply the words after the hyphen. For example break would apply to everything that ends in *-break

    • block-break
    • block-burn
    • block-fade
    • block-fall
    • block-form
    • block-place
    • block-shift
    • block-spread
    • block-use
    • bucket-fill
    • bonemeal-use
    • cake-eat
    • container-access
    • craft-item
    • creeper-explode
    • crop-trample
    • dragon-eat
    • enchant-item
    • enderman-pickup
    • enderman-place
    • entity-break
    • entity-dye
    • entity-explode
    • entity-follow
    • entity-kill
    • entity-shear
    • entity-spawn
    • fireball
    • hangingitem-break
    • hangingitem-place
    • item-drop
    • item-insert
    • item-pickup
    • item-remove
    • lava-break
    • lava-bucket
    • lava-flow
    • lava-ignite
    • leaf-decay
    • lighter
    • lightning
    • mushroom-grow
    • player-chat
    • player-command
    • player-death
    • player-join
    • player-kill
    • player-quit
    • player-teleport
    • potion-splash
    • sheep-eat
    • sign-change
    • spawnegg-use
    • tnt-explode
    • tnt-prime
    • tree-grow
    • vehicle-break
    • vehicle-enter
    • vehicle-exit
    • vehicle-place
    • water-break
    • water-bucket
    • water-flow
    • world-edit
    • xp-pickup
    Understanding Action Relationships
    Prism classifies different actions that are similar as different actions so that you have amazing power to find, rollback, and restore what you need.

    Prism uses relationships in two ways.

    Families
    Action families simply refer to the fact that creeper-explode and tnt-explode are pretty much the same thing, just with two different causes. If you use the short name explode it will find actions that match either of those sub-actions. If you're specific, you'll only see results for one type.

    Compare the normal action names with the short name list and you'll see a bunch more. block-break and water-break are nearly the same but can be tracked separately, but both can be queried with a:break if you wish.

    Causality
    Some events are related because one causes another. In order to master rolling back griefs you really need to understand these.

    Here's a simple example. A wooden wall with a torch is burning down. The block burns are recorded as block-burn but when the block holding the torch is removed the torch detaches, creating a block-break event. Prism is very clear about what events mean so we don't want to record the torch as a burn event, because they can't burn.

    Any near/lookup/inspect query will clearly show the events for you.

    If you wish to roll back the entire wall, you should use /prism rollback a:burn,break. Or if you need to very specific, /prism rollback a:block-burn,block-break.

    Prism is smart enough to rollback the wall first and then re-attach the torch.

    As you learn what the different events represent, you'll become a master with related actions.

    Here are some more quick (detailed for your information) examples:

    /prism rollback a:water-flow,water-break - Water flow and any items it broke. /prism rollback a:block-break,block-fade - Tree broken and the leaves fading.

    Command-Time Flags
    There are some command flags we'll gradually be exposing to the public that control specific details about the process you're running, giving you a whole new level of control over Prism.

    Drain/Drain Water/Drain Lava
    /prism (cmd) (params) -drain

    Adding a drain flag initiates a drain action (exactly as done by /prism drain) during the rollback. Use -drain-lava or -drain-water to target a specific liquid.

    Extended
    Unless you've enabled extended logs in the config, we don't show you the extra info to reduce clutter. But you may want it. Use -extended to see the extended logs.

    No Group
    Don't want to see actions grouped together? Use -no-group.

    No Extinguish
    /prism (cmd) (params) -no-ext

    If configured, prism will automatically put out a burning fire when doing an a:burn rollback. If you need to disable this feature for a specific rollback, use this flag at command time.

    Overwrite
    /prism (cmd) (params) -overwrite

    Overwrite any block that may happen to be in the way and would normally be skipped.

    Per-Page
    /prism (cmd) (params) -per-page=#

    The number of results for the current page.

    Share
    /prism (cmd) (params) -share=#

    A list of online players to share the current lookup results with.
     
  4. momai

    momai Administrator В вайтлисте

    Сообщения:
    2.263
    Симпатии:
    234
    Баллы:
    204
    Reports
    Prism offers a limited set of reports on block and action data per player. We have plans to expand the functionality but for now we're covering the basics for those familiar with logblock.

    prism (rp|report) sum (blocks|actions) (player)

    A summary report for blocks will list the total number of block break/place actions for the player, broken down by block.

    The actions summary will display a count for each action type for the specific player.

    Ore Alerts
    Originally custom designed for our MC server, to replace a previous plugin that didn't work anymore - this system alerts you when a player discovers a natural (non-placed) vein or ores. It reports the ore type and the lighting levels (not always indicative of xray due to brightness differences). The ore type messages are colored for easy recognition.

    On our server, we've found this extremely effective at spotting xray. Players who show very clear patterns are very easy to identify.

    Item Use Alerts
    Item use alerts tell when you a player is using something that's possibly related to griefing. Lighting fires, placing tnt, placing pistons, etc.

    If you wish, you may also define a list blocks that will alert you when broken.

    Vanilla Piston Xray Alert
    There's a known exploit involving a piston that lets you see through blocks and Prism 1.4+ will attempt to alert you when it seems like a player is trying to use this trick.

    Ex, Drain
    Use /prism ex [radius] to extinguish all fires in the radius, or /prism drain [radius] to remove all liquid (water and lava) in the radius.

    You may also drain specific subtypes of liquid, so /prism drain water or lava, and if providing a radius, /prism drain lava 10.

    Chunk Boundary View
    Use /pr view chunk to view a glowstone preview of the chunk edges. Repeat the command to disable.

    When performing a rollback of block-burn actions, Prism will automatically extinguish the fires as well.

    Delete
    Server operators can use /prism delete [timeframe] to manually purge records from the database. This isn't usually necessary, as Prism will automatically clear records that have expired (per config) on startup.
     
  5. momai

    momai Administrator В вайтлисте

    Сообщения:
    2.263
    Симпатии:
    234
    Баллы:
    204
    Full Commands List
    • prism or pr for short
    • prism i
    • prism l (params)
    • prism near
    • prism page ([#]|next|prev) or pg for short
    • prism (preview|pv) (rollback|rb) (params)
    • prism (preview|pv) (restore|rs) (params)
    • prism (preview|pv) apply
    • prism (preview|pv) cancel
    • prism (rollback|rb) (params)
    • prism (restore|rs) (params)
    • prism ex [radius]
    • prism drain [radius]
    • prism tp [index]
    • prism tp id:[id]
    • prism (wand|w) (rollback|restore|i|inspect|p|profile|off)
    • prism setmy wand mode (hand|item|block)
    • prism setmy wand item [id]
    • prism resetmy wand
    • prism delete (params)
    • prism about
    • prism (report|rp) queue
    • prism (rp|report) sum (blocks|actions) (player)
    • prism (view|v) (chunk|c)
    • prism ? - Help.
    • prism params - List parameters in-game.
     
  6. momai

    momai Administrator В вайтлисте

    Сообщения:
    2.263
    Симпатии:
    234
    Баллы:
    204
    Permissions
    • prism.help - Users may see the prism help files.
    • prism.wand.* - Allow use of all wands.
    • prism.wand.inspect - Allow inspect wand. Auto if user has .lookup
    • prism.wand.profile - Allow profile wand. Auto if user has .lookup
    • prism.wand.rollback - Allow rollback wand. Auto if user has .rollback
    • prism.wand.restore - Allow restore wand. Auto if user has .restore
    • prism.setmy.wand - Allow user to set their personal wand prefs (if enabled via config). They must also have permission to a wand.
    • prism.lookup - Grants lookup, inspector, near permissions. Recommended for: Experienced players.
    • prism.lookup.paginate - Grants pagination access, without having lookup.
    • prism.parameters.* - Allow mods to use all lookup parameters. Children nodes are the parameter name, i.e. radius or player
    • prism.parameters.action
    • prism.parameters.before
    • prism.parameters.block
    • prism.parameters.entity
    • prism.parameters.id
    • prism.parameters.keyword
    • prism.parameters.player
    • prism.parameters.radius
    • prism.parameters.since
    • prism.parameters.world
    • prism.parameters.flag.*
    • prism.parameters.flag.drain
    • prism.parameters.flag.drain-lava
    • prism.parameters.flag.drain-water
    • prism.parameters.flag.extended
    • prism.parameters.flag.no-ext
    • prism.parameters.flag.no-itemclear
    • prism.parameters.flag.per-page
    • prism.parameters.flag.no-group
    • prism.parameters.flag.overwrite
    • prism.parameters.flag.share
    • prism.parameters.flag.paste
    • prism.extinguish - For removing fires in a radius. Recommended for: Experienced players.
    • prism.drain - Removing water/lava in a radius. Recommended for: Experienced players.
    • prism.preview - Grants permission to preview and then rollback/restore changes. Recommended for: Staff
    • prism.rollback - Grants permission to rollback changes. Recommended for: Experienced Staff
    • prism.restore - Grants permission to restore (reapply) changes. Recommended for: Experienced Staff
    • prism.tp - Teleport to a record ID. Recommended for: Experienced players.
    • prism.report - View reports. Recommended for: Staff
    • prism.reload - Grants config reload permission. Recommended for: OPs
    • prism.delete - Purge records from database via commands. Recommended for: OPs
    • prism.alerts - Alerts for ore finds, dangerous block placements.
    • prism.alerts.ores.ignore - Player with this perm will not trigger an ore alert.
    • prism.alerts.use.place.ignore - Player with this perm will not trigger a block place alert.
    • prism.alerts.use.break.ignore - Player with this perm will not trigger a block break alert.
    • prism.alerts.use.lighter.ignore - Player with this perm will not trigger a lighter use alert.
    • prism.alerts.use.lavabucket.ignore - Player with this perm will not trigger a lava bucket placement alert.
    • prism.alerts.ignore - Parent node for all alerts
    • prism.bypass-use-alerts - Trusted players will be ignored for use alert feature.
    • prism.override-max-lookup-radius - Allows a user to override the max lookup radius. Defaults to off, so it must explicitly be set.
    • prism.override-max-applier-radius - Allows a user to override the max applier radius. Defaults to off, so it must explicitly be set.
    • prism.ignore.tracking.(action-type) - Ignore an action type for a specific group.
    • prism.view - Use the view commands
    • prism.* - Grants all permissions. Warning: Includes all of the ignore tracking permission nodes.
     
  7. momai

    momai Administrator В вайтлисте

    Сообщения:
    2.263
    Симпатии:
    234
    Баллы:
    204
    Why am I not being tracked at all by Prism? Is it because I'm OP?here in the plugin.yml, and are all under the prism.ignore.tracking node.

    While these permissions are set, by default, to not be given to anybody unless explicitly set, we've had a lot of users who have given their "admin" group a permission like prism.* or *. Both of these cause the ignore permissions to be set to true, and therefore, Prism will ignore those users' actions. These permissions are not set because you are OP, they are only set if you have them set in your permissions file.

    We recommend users to remove their * or prism.* permission from that group, and instead set all the permissions they need manually. This removes the need to negate certain permissions, and make sure the users only have access to the permissions they need. (OP should automatically grant certain permissions, through the plugin.yml).

    However, if you want to cling onto your setup with your *s, another 'solution' is to negate the prism.ignore.tracking.* permission. This will make sure you don't have the permissions under prism.ignore.tracking, and therefore, Prism will track your actions. (In some permission plugins, this may not work correctly, and some changes to your permissions may be required).

    [paste:font size="4"]Why is there no SQLite support in Prism 2.x?Installation.

    [paste:font size="4"]Prism is enabled but I can't do (something)

    There are only a few reasons Prism would be connected to the database, but still not working:

    1. Check that you have given yourself/your users proper permission nodes.
    2. If you have worldedit, and it's older than 5.4, Prism can't connect and may cause errors.
    Nothing is recording when I do things
    1. If you're in creative mode, check if you're ignoring players in creative in the config.
    2. Make sure the world, your playername, etc are not in the "ignore" lists in the config.
    3. Make sure the action you're testing is set to track.
    4. Check the console for any database errors.
    "Data truncation" errors for Y axis on Prism 1.2
    1.2 made a tweak to the database assuming people won't have negative Y axis values, which turned out to be untrue. We reversed this for 1.3 but it won't auto-apply. If you have plugins/mods that let you go below bedrock, run the following query in MySQL:

    ALTER TABLE prism_actions CHANGE y y SMALLINT( 5 ) NOT NULL;

    Pool Exhaustion or Database Connection Errors
    Most common if you're using a slow remote MySQL server. Communicating with a remote server will always be slower than running MySQL locally, because the data has to communicate across the internet each time. Sometimes this can be too slow and the default number of open connections runs out.

    Just try increasing the max-pool-connections to a higher number. What number is best is up to you. This allows Prism to reserve more connections. Just understand that anything over 100 is most likely to exceed the max connections allowed per user setting on the MySQL server itself.

    You can also lower the max-wait so the pool doesn't wait on connections as long. The time is in milliseconds.

    Metrics Class causes time outs, lags the server
    Metrics is a class that reports anonymous stats on who uses the plugin, and is very helpful in letting us know how many users we have. However, sometimes it has issues and times out. We've reported the issue but have been given little help.

    Just disable the use-metrics config and you'll be fine. Just pop by IRC and let us know you use Prism if you like it!