Interdicted Patterns 1.2

Prevents certain patterns from being made on banners

  1. Strahan
    Tested Minecraft Versions:
    • 1.8
    • 1.9
    • 1.10
    • 1.11
    • 1.12
    I threw this together because someone was asking for this functionality and it sounded interesting to try. As I'm a Java beginner, if you hit problems post the stack trace and what you were doing and I'll try to fix it.

    The way it works is you create "designs". The designs have whatever pattern types. When someone crafts a banner, it loops through all the designs and checks to see if the patterns match what is being made. So if you had a design "teeth" with pattern types triangles_top and triangles_bottom, it will let you craft a banner with triangles on top OR triangles on bottom but not both together as that matches an interdicted design. If you wanted to block any skull banners, you would make a design with just one pattern "skull" for example. You can have as many designs as you want with as many patterns per design as you want.

    Usage and permissions:

    Administrative permission to be able to do it all is ipat.admin

    /IPAT
    Main control command

    /IPAT LIST d | p | c
    ipat.list to be able to get help
    ipat.list.patterns to be able to list patterns
    ipat.list.designs to be able to list designs
    ipat.list.colors to be able to list colors

    Lists all known (d)esigns, (p)attern types or (c)olors. The p option is handy because this uses the PatternType enum to validate pattern types for the designs and I assume not everyone knows the enum pattern types off the top of their heads. Same with the c option, that's to list the values of the DyeColor enum.

    /IPAT MSG
    ipat.msg
    Lists the strings used by the plugin

    /IPAT MSG msgcode
    ipat.msg.view
    Shows the current value of the message code

    /IPAT MSG msgcode value
    ipat.msg.set
    Sets the value of the message code. You can use vars %br% for a line break, %pattern% for pattern and %design% for design. Obviously it is context related, so if you use %pattern% in the reload message it will not get replaced with anything.

    /IPAT RELOAD
    ipat.reload
    Reloads the config

    /IPAT design
    ipat.design.pattern.list
    Lists the pattern types in a design

    /IPAT design ADD (patterntype | patterntype:color)
    ipat.design.pattern.add
    Adds a pattern type to a design. If the design doesn't exist, it creates it. If the patterntype is alone, it blocks any color of that pattern in the design. If you pass it a color after colon, it only blocks if the pattern is made in the specified color. You can pass multiple designations per command, so if you wanted to block any SKULL and green MOJANG, you would do: /ipat mydesign add skull mojang:green

    /IPAT design DEL (patterntype | patterntype:color)
    ipat.design.pattern.del
    Removes a pattern type from a design

    /IPAT design CLEAR
    ipat.design.del
    Removes a design

    /IPAT EXAMINE (craft | punch | hand)
    ipat.examine
    ipat.examine.craft
    ipat.examine.punch
    ipat.examine.hand

    Turning this on will make the system message you with what pattern types are applied to a banner in certain instances. If you do /ipat examine and it is off, it will turn the mode on set to "craft" trigger. If you do it again, it toggles off. You can pass what trigger mode you want. Trigger modes are craft, punch and hand. In craft mode when you craft a banner, it will tell you the pattern types. In punch mode, if you punch a banner once it will tell you that banner's pattern types. In hand mode if you hold the banner in your hand it will tell you the banner's pattern types. Hand mode requires an item swap in your hand, so if you turn it on whilst holding a banner you need to hit another item in the hotbar then go back to see the results. If you do /ipat examine with no trigger passed, it will default to whatever trigger the user has permission for in the order craft, hand and punch. To use this at all, the user needs ipat.examine then each trigger mode use requires the related permission.

Recent Reviews

  1. Fonzee9
    Fonzee9
    5/5,
    Version: 1.2
    Thank you so much for this.. I really mean it this helps me so much my problem for a year was, people kept making inappropriate banners and it made me upset that i couldn't stop it/prevent it and now i can with this :). Thank you again this makes running my server a lot easier i no longer have to check if someone is going to make that inappropriate banner again. Cheers!!
    1. Strahan
      Author's Response
      Glad to hear it :)
  2. Fonzee9
    Fonzee9
    5/5,
    Version: 1.1
    How can i block that banner from being made now? It keeps saying invalided pattern
    1. Strahan
      Author's Response
      Create a design that has the pattern half_horizontal. Like /ipat nohh add half_horizontal
  3. Fonzee9
    Fonzee9
    5/5,
    Version: 1.0
    1. Strahan
      Author's Response
      That's "half_horizontal". I'm working on an update that will add an examine mode so you can craft a banner and it will let you know the pattern types that were applied.